[jira] [Updated] (FOP-2878) Font-variant (small-caps) partial implementation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (FOP-2878) Font-variant (small-caps) partial implementation

simon steiner (Jira)

     [ https://issues.apache.org/jira/browse/FOP-2878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juan updated FOP-2878:
----------------------
    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:
{code:java}
<font embed-url="arial-smallcaps.ttf">
 <font-triplet name="Arial" style="smallcaps" weight="normal"/>
</font>{code}
 

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.

  was:
[https://www.w3.org/TR/xsl/#font-variant]

Implemented small-caps support, limited to:
 * 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_"
 * 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:
{code:java}
<font embed-url="arial-smallcaps.ttf">
 <font-triplet name="Arial" style="smallcaps" weight="normal"/>
</font>{code}
 

See input-fonts.fo for sample input.


> Font-variant (small-caps) partial implementation
> ------------------------------------------------
>
>                 Key: FOP-2878
>                 URL: https://issues.apache.org/jira/browse/FOP-2878
>             Project: FOP
>          Issue Type: New Feature
>            Reporter: Juan
>            Priority: Minor
>         Attachments: font-variant-part-2.patch, font-variant.patch, input-fonts.fo
>
>
> [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:
> {code:java}
> <font embed-url="arial-smallcaps.ttf">
>  <font-triplet name="Arial" style="smallcaps" weight="normal"/>
> </font>{code}
>  
> 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.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)