On Fri, 2 Jul 2021 12:34:32 GMT, Johan Vos <j...@openjdk.org> wrote:

>> Another thought .. after doing this do these "." fonts appear in the list of 
>> fonts reported by
>> javafx.scene.text.Font.getFontNames() ?
>> 
>> I suspect they really should not ..
>
> They are in there. But with the current approach for CT glyph-parsing, I see 
> no other way. The parsing is done in native code (e.g. 
> OS.CTLineCreateWithAttributedString()) but we extract the required font from 
> the returned runs, e.g. 
> `String fontName = CTFontCopyAttributeDisplayName(actualFont);`
> Next, the `fontName` is searched for, but if it is not in the "public" list 
> of fonts, this fails. So if we don't make these dot fonts public, this 
> approach doesn't work.

When you say "public" you mean in the lists that the implementation searches 
for a match ?
This could get tricky. I don't have a complete answer off the top of my head.
Could we at least filter the returned list of full and family names to exclude 
them ?
Then explicit searches would work but no one will be seeing them in a list of 
fonts available to apps.

-------------

PR: https://git.openjdk.java.net/jfx/pull/547

Reply via email to