Tecnologías XML / XSL-FO / Referencia / Atributos de XSL-FO / font-weight
(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.9
Categoría: 7.9 Propiedades comunes de fuentes
Descripción
Este atributo selecciona la variante de fuente según el grosor del trazo. Admite palabras clave relativas y absolutas, así como determinados valores numéricos. Las palabras clave absolutas representan valores fijos. Las relativas aumentan o reducen en 200 el grosor del área circundante. La escala va de 100 a 900 en incrementos de 100, con 400 como valor normal. Pocas fuentes disponen de una variante para cada nivel. Si la variante requerida no existe, se utiliza la disponible más cercana.
Valores
normal | Constante relativa de grosor. Se utiliza el grosor normal (equivalente a 400). |
bold | Constante relativa de grosor. Se utiliza negrita (equivalente a 700). |
bolder | Constante relativa de grosor. El grosor obtenido por herencia aumenta en 200. |
lighter | Constante relativa de grosor. El grosor heredado se reduce en 200. |
100 | Constante absoluta de grosor. Respecto al grosor normal (= 400), se reduce tres niveles. |
200 | Constante absoluta de grosor. Respecto al grosor normal (= 400), se reduce dos niveles. |
300 | Constante absoluta de grosor. Respecto al grosor normal (= 400), se reduce un nivel. |
400 | Constante absoluta de grosor. Se utiliza el grosor normal. |
500 | Constante absoluta de grosor. Respecto al grosor normal (= 400), se aumenta un nivel. |
600 | Constante absoluta de grosor. Respecto al grosor normal (= 400), se aumenta dos niveles. |
700 | Constante absoluta de grosor. Es la negrita habitual, sinónimo de la palabra clave bold. |
800 | Constante absoluta de grosor. Respecto a la negrita (700), se aumenta un nivel adicional. |
900 | Constante absoluta de grosor. Respecto a la negrita (700), se aumenta dos niveles adicionales. |
Heredado: | sí |
Valor predeterminado: normal
Versión de XSL-FO: 1.0
Permitido en:
<fo:bidi-override> , <fo:block> , <fo:bookmark-title> , <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 |
Básico | S | P | 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="Verdana" font-size="8pt">
<fo:table-column margin-right="10mm" column-width="33%"/>
<fo:table-column column-width="17%"/>
<fo:table-column margin-right="10mm" column-width="33%"/>
<fo:table-column column-width="17%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="400">
»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-weight="400">
400
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="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-weight="normal">
normal
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="300">
»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-weight="300">
300
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="200">
»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-weight="200">
200
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="100">
»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-weight="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-weight="500">
»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-weight="500">
500
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="600">
»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-weight="600">
600
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="700">
»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-weight="700">
700
</fo:block>
</fo:table-cell>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="bold">
»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-weight="bold">
bold
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="800">
»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-weight="800">
800
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="900">
»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-weight="900">
900
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-right="2mm">
<fo:block space-after="1em" font-weight="bold">
»was für einen
anstrengenden
<fo:inline font-weight="lighter">
Beruf habe ich
gewählt!
<fo:inline font-weight="lighter">
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-weight="bold">
bold (
<fo:inline font-weight="lighter">
lighter
</fo:inline>
,
<fo:inline font-weight="lighter">
<fo:inline font-weight="lighter">
lighter &
lighter
</fo:inline>
</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-weight="normal">
»was für einen
anstrengenden
<fo:inline font-weight="bolder">
Beruf habe ich
gewählt!
<fo:inline font-weight="bolder">
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-weight="normal">
normal (
<fo:inline font-weight="bolder">
bolder,
<fo:inline font-weight="bolder">
bolder & bolder
</fo:inline>
</fo:inline>
)
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>En la salida:
Extracto de la recomendación del W3C:
Más información en línea sobre
Introducción: «Recursos tipográficos»>
Descripción de la propiedad en la referencia CSS «font-weight»