Technologies XML / XSL-FO / Référence / Attributs de XSL-FO / font-weight

(Extrait 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

Section de la recommandation : 7.9.9

Catégorie : 7.9 Propriétés communes de police

Description

Cet attribut sélectionne la variante de police selon la graisse, c’est-à-dire l’épaisseur du trait. Il accepte des mots-clés relatifs ou absolus et certaines valeurs numériques. Les mots-clés absolus correspondent à des valeurs fixes. Les mots-clés relatifs augmentent ou diminuent de 200 la graisse de la zone environnante. L’échelle va de 100 à 900 par pas de 100, avec 400 comme valeur normale. Peu de polices proposent une variante pour chaque palier. Si la variante requise n’existe pas, la variante disponible la plus proche est utilisée.

Valeurs

normal

Constante relative de graisse. La graisse normale est utilisée (équivalente à 400).

bold

Constante relative de graisse. Le gras est utilisé (équivalent à 700).

bolder

Constante relative de graisse. La graisse obtenue par héritage est augmentée de 200.

lighter

Constante relative de graisse. La graisse héritée est réduite de 200.

100

Constante absolue de graisse. Par rapport à la graisse normale (= 400), elle est réduite de trois niveaux.

200

Constante absolue de graisse. Par rapport à la graisse normale (= 400), elle est réduite de deux niveaux.

300

Constante absolue de graisse. Par rapport à la graisse normale (= 400), elle est réduite d’un niveau.

400

Constante absolue de graisse. La graisse normale est utilisée.

500

Constante absolue de graisse. Par rapport à la graisse normale (= 400), elle est augmentée d’un niveau.

600

Constante absolue de graisse. Par rapport à la graisse normale (= 400), elle est augmentée de deux niveaux.

700

Constante absolue de graisse. Il s’agit du gras habituel, synonyme du mot-clé bold.

800

Constante absolue de graisse. Par rapport au gras (700), elle est augmentée d’un niveau supplémentaire.

900

Constante absolue de graisse. Par rapport au gras (700), elle est augmentée de deux niveaux supplémentaires.

Hérité :

oui

Valeur par défaut : normal

Version XSL-FO : 1.0

Autorisé dans :

<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> et <fo:title>

Prise en charge :

Niveau de conformité

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

De base

O

P

O

O

O

Exemple 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>

Télécharger les exemples

Dans la sortie :

Extrait de la recommandation du W3C :

Informations complémentaires en ligne sur

Introduction : « Procédés typographiques »>

Description de la propriété dans la référence CSS « font-weight »

Présentation de la propriété dans la référence XSL-FO

haut de page