Tecnologías XML / XSL-FO / Referencia / Atributos de XSL-FO / font-stretch

(Extracto de «XSL-FO ― Die Referenz» de Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Sección de la recomendación: 7.9.5

Categoría: 7.9 Propiedades comunes de fuentes

Descripción

Este atributo selecciona variantes de fuente con una anchura de caracteres específica, más estrechas o más anchas. Se admiten palabras clave relativas y absolutas. Las absolutas amplían o condensan la anchura de normal mediante factores fijos (1,2, 1,2², 1,2³, etc.). Las relativas modifican la anchura del área circundante en un factor de 1,2. Los formateadores también pueden admitir porcentajes.

Valores

normal

Constante absoluta de anchura. Se utiliza la anchura normal de los caracteres de la fuente (100%).

wider

Constante relativa de anchura. La anchura obtenida por herencia se amplía en un factor de 1,2.

narrower

Constante relativa de anchura. La anchura heredada se reduce en un factor de 1,2.

semi-expanded

Constante absoluta de anchura. La anchura se amplía un 120% respecto a la anchura normal de la fuente.

semi-condensed

Constante absoluta de anchura. La anchura se reduce un 83% respecto a la anchura normal de la fuente.

expanded

Constante absoluta de anchura. La anchura se amplía un 144% respecto a la anchura normal de la fuente.

condensed

Constante absoluta de anchura. La anchura se reduce un 69,4% respecto a la anchura normal de la fuente.

extra-expanded

Constante absoluta de anchura. La anchura se amplía un 172,8% respecto a la anchura normal de la fuente.

extra-condensed

Constante absoluta de anchura. La anchura se reduce un 57,9% respecto a la anchura normal de la fuente.

ultra-expanded

Constante absoluta de anchura. La anchura se amplía un 207,4% respecto a la anchura normal de la fuente.

ultra-condensed

Constante absoluta de anchura. La anchura se reduce un 48,2% respecto a la anchura normal de la fuente.

Heredado:

sí

Valor predeterminado: normal

Versión de XSL-FO: 1.0

Permitido en:

<fo:bidi-override> , <fo:block> , <fo:character> , <fo:initial-property-set> , <fo:inline> , <fo:leader> , <fo:page-number> , <fo:page-number-citation> , <fo:page-number-citation-last> , <fo:scaling-value-citation> y <fo:title>

Compatibilidad:

Nivel de conformidad

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

Ampliado

S

N

S

S

S

Ejemplo de XSL-FO:

<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
                      0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="26mm 25mm 41mm
                        25mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:flow flow-name="xsl-region-body">
<fo:table font-family="Arial" font-size="8pt">
<fo:table-column margin-right="10mm" column-width="50%"/>
<fo:table-column column-width="25%"/>
<fo:table-column column-width="25%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="normal">
»was für einen anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der
                Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="normal">
normal
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="100%">
100%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="semi-condensed">
»was für einen
                anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="semi-condensed">
semi-condensed
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="83%">
83%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="condensed">
»was für einen anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der
                Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="condensed">
condensed
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="69.4%">
69.4%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="extra-condensed">
»was für einen
                anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="extra-condensed">
extra-condensed
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="57.9%">
57.9%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="ultra-condensed">
»was für einen anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der
                Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="ultra-condensed">
ultra-condensed
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="48.2%">
48.2%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="semi-expanded">
»was für einen
                anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="semi-expanded">
semi-expanded
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="120%">
120%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="expanded">
»was für einen anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der
                Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="expanded">
expanded
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="144%">
144%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="extra-expanded">
»was für einen
                anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="extra-expanded">
extra-expanded
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="172.8%">
172.8%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="ultra-expanded">
»was für einen anstrengenden Beruf habe ich gewählt! Tag aus, Tag ein auf der
                Reise.
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="ultra-expanded">
ultra-expanded
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="207.4%">
207.4%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="expanded">
»was für einen
                anstrengenden 
<fo:inline font-stretch="wider">
Beruf habe ich
                gewählt! 
<fo:inline font-stretch="wider">
Tag aus, Tag ein
                auf der Reise.
</fo:inline>
</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="expanded">
expanded (
<fo:inline font-stretch="wider">
wider
</fo:inline>
, 
<fo:inline font-stretch="wider">
<fo:inline font-stretch="wider">
wider &
                wider
</fo:inline>
</fo:inline>
)
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="144%">
144% (
<fo:inline font-stretch="172.8%">
172.8%
</fo:inline>
, 
<fo:inline font-stretch="207.4%">
207.4%
</fo:inline>
)
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-stretch="condensed">
»was für einen anstrengenden 
<fo:inline font-stretch="narrower">
Beruf habe ich gewählt! 
<fo:inline font-stretch="narrower">
Tag aus, Tag ein auf der Reise.
</fo:inline>
</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="expanded">
condensed (
<fo:inline font-stretch="narrower">
narrower, 
<fo:inline font-stretch="narrower">
narrower &
                narrower
</fo:inline>
</fo:inline>
)
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block font-stretch="69.4%">
69.4% (
<fo:inline font-stretch="57.9%">
57.9%
</fo:inline>
, 
<fo:inline font-stretch="48.2%">
48.2%
</fo:inline>
)
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>

Descargar los ejemplos

En la salida:

Extracto de la recomendación del W3C:

Más información en línea sobre

Introducción: «Formato en línea»>

Introducción: «Recursos tipográficos»>

Ejemplo práctico: «Uso de recursos tipográficos»>

Descripción de la propiedad en la referencia CSS «font-stretch»

Representación de la propiedad en la referencia de XSL-FO

volver arriba