Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
Patch
Description
https://www.w3.org/TR/xsl/#font-variant
Implemented small-caps support, working cases:
- Fake small-caps: When using a normal font, the lowercase letters are changed to uppercase but keeping the small size.
- Since it's always possible to scale characters, there's no need to implement the last fallback: "As a last resort, unscaled uppercase letter glyphs in a normal font may replace glyphs in a small-caps font so that the text appears in all uppercase letters"
- Autodetected small-caps fonts: Improved auto-detection (font name based) to also detect smallcaps.
- Manually added true small-caps fonts: A true small-caps font can be enabled on config file, that version of the font will be used instead of applying the fake transformation.
Font config example:
<font embed-url="arial-smallcaps.ttf"> <font-triplet name="Arial" style="smallcaps" weight="normal"/> </font>
See input-fonts.fo for sample input.
Note: font-variant-part-2.patch is based on font-variant.patch, so they should be applied in order.
font-variant.patch: Adds fake small-caps and manually added small-caps fonts.
font-variant-part-2.patch: Adds small-caps font autodetection.