Toparvion opened a new pull request, #153: URL: https://github.com/apache/pdfbox/pull/153
This is a proposal for overcoming current GSUB table handling limitation of FontBox library. It is currently not possible to read GSUB table data for any language other than Bengali. This PR introduces 2 new methods to `org.apache.fontbox.ttf.GlyphSubstitutionTable` class: 1. `getSupportedScriptTags` to fetch a read-only view of the `scriptList` map keys; 1. `getGsubData(String)` to obtain `GsubData` for given script tag (that can be determined by the method above). In order to make it possible to read GSUB data without actual glyph substitution, the PR also changes the behavior of `org.apache.fontbox.ttf.gsub.GsubWorkerFactory`: - **Before** the change it used to throw an exception for any non-supported language (in fact - for any one other than Bengali); - **After** the change it would return a default `GsubWorker` implementation that doesn't perform actual glyph transformations (substitutions) but emits a WARN message into the log. The PR introduces primarily additive changes. The previous behavior of obtaining GSUB data for the first detected supported language (and its caching) has been kept intact. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
