[
https://issues.apache.org/jira/browse/PDFBOX-5808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17930971#comment-17930971
]
Tilman Hausherr commented on PDFBOX-5808:
-----------------------------------------
{code:java}
return Arrays.stream(s.split("(?<=" + StringUtil.PATTERN_SPACE + ")|(?=" +
StringUtil.PATTERN_SPACE + ")"))
.toArray(String[]::new);
{code}
Why the stream? It works with {{s.split()}} only. I'm removing the .stream()
and the .toArray() and keeping just the split. Was there a reason for it (if so
I'll restore it) or did you originally have more processing so streaming was
needed, and then forgot to remove it?
> Add support for GSUB Lookup Type 3
> ----------------------------------
>
> Key: PDFBOX-5808
> URL: https://issues.apache.org/jira/browse/PDFBOX-5808
> Project: PDFBox
> Issue Type: New Feature
> Components: FontBox
> Affects Versions: 3.0.2 PDFBox
> Reporter: Fabrice Calafat
> Assignee: Tilman Hausherr
> Priority: Major
> Labels: gsub
> Fix For: 3.0.3 PDFBox, 4.0.0
>
> Attachments: image-2024-04-30-14-06-16-298.png, screenshot-1.png,
> screenshot-2.png, screenshot-3.png, screenshot-4.png, screenshot-5.png
>
>
> Add support for the lookup type 3, Alternate Substitution when handling GSUB:
> [https://learn.microsoft.com/en-us/typography/opentype/spec/gsub#AS]
> The first available substitution glyph can be used (as done in other
> libraries)
>
> Also, the current implementation of CompoundCharacterTokenizer doesn't
> account for collision in ligatures
> For example, if a font supports ligatures for _att_ and {_}en{_}, the current
> implementation will not tokenize properly for the word _attention._ This is
> because the regex implementation doesn't allow for a proper split
>
> I'll open a proposed implementation for the above
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]