XML technologies / XSL-FO / Reference / Attributes in XSL-FO / font-weight
(Excerpt from "XSL-FO ― Die Referenz" by 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
Recommendation section: 7.9.9
Category: 7.9 Common Font Properties
Description
This attribute selects the font face by stroke weight (thickness). Relative and absolute keywords and certain numeric values can be specified. Absolute keywords represent fixed numeric values. Relative keywords increase or decrease the surrounding weight by 200 on the numeric scale. The scale runs from 100 to 900 in steps of 100, with 400 as normal. Few fonts provide a separate face for every step. If the required face is unavailable, the nearest available face is used.
Values
normal | Relative weight constant. Normal weight is used (equivalent to 400). |
bold | Relative weight constant. Bold weight is used (equivalent to 700). |
bolder | Relative weight constant. The weight obtained through inheritance is increased by 200. |
lighter | Relative weight constant. The inherited weight is decreased by 200. |
100 | Absolute weight constant. Compared with normal weight (= 400), the weight is reduced by three steps. |
200 | Absolute weight constant. Compared with normal weight (= 400), the weight is reduced by two steps. |
300 | Absolute weight constant. Compared with normal weight (= 400), the weight is reduced by one step. |
400 | Absolute weight constant. Normal weight is used. |
500 | Absolute weight constant. Compared with normal weight (= 400), the weight is increased by one step. |
600 | Absolute weight constant. Compared with normal weight (= 400), the weight is increased by two steps. |
700 | Absolute weight constant. This is ordinary bold weight, synonymous with the keyword bold. |
800 | Absolute weight constant. Compared with bold weight (700), the weight is increased by one further step. |
900 | Absolute weight constant. Compared with bold weight (700), the weight is increased by two further steps. |
Inherited: | yes |
Default value: normal
XSL-FO version: 1.0
Allowed in:
<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> and <fo:title>
Support:
Conformance level | Antenna House | FOP | RenderX XEP | Altsoft XML2PDF | Compart DocBridge |
Basic | Y | P | Y | Y | Y |
XSL-FO example:
<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>In the output:
Excerpt from the W3C Recommendation:
More information online about
Introduction: "Typographic techniques">