[ 
https://issues.apache.org/jira/browse/PDFBOX-6103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040434#comment-18040434
 ] 

Tilman Hausherr commented on PDFBOX-6103:
-----------------------------------------

The newer roboto font also has latin. However the test of the old font doesn't 
really test anything because all that font offers is "smcp" which isn't tested. 
You're basically testing that nothing gets replaced. How about just using the 
Josefin font? You could use that one for the cases where nothing gets replaced, 
e.g. "font" or "code".

> Add DFLT script support in GSUB system for OpenType fonts
> ---------------------------------------------------------
>
>                 Key: PDFBOX-6103
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6103
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox
>    Affects Versions: 3.0.6 PDFBox
>            Reporter: Fabrice Calafat
>            Priority: Minor
>
> Currently, the PDFBox GSUB (Glyph Substitution) system does not handle the 
> DFLT (default) script tag defined in the OpenType specification. According to 
> the OpenType spec, the DFLT script table is used to
>   define features that are not script-specific and should be applied when:
>   1. No script table exists for the specific script of the text being 
> processed
>   2. Text lacks a defined script (containing only symbols or punctuation)
> * Impact:*
>   Fonts that rely on DFLT script features may not render correctly, 
> particularly when processing text containing symbols, punctuation, or 
> unsupported scripts.
> *Solution:*
>   This patch adds a new GsubWorkerForDflt class that implements 
> script-neutral typographic features according to OpenType standards. The 
> implementation:
>   - Creates a dedicated GSUB worker for handling DFLT script
>   - Integrates with the existing GsubWorkerFactory
>   - Applies common typographic features in the standard recommended order
>   - Follows OpenType specification guidelines for universal glyph 
> substitutions
> *Testing:*
>   Comprehensive unit tests have been added using real-world fonts 
> (JosefinSans-Italic.ttf and RobotoMono-Regular.ttf) to verify correct DFLT 
> script processing.
> *Reference:*
>   
> https://learn.microsoft.com/en-us/typography/opentype/spec/chapter2#scriptlist-table
> *Pull request*
> https://github.com/apache/pdfbox/pull/351



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to