Non-Latin/Greek/Roman Font

Is there a cross-platform way to detemine if an installed font is not “ABC…XYZ” (ie. Symbol, ZapfDingbats or some other glyph format)
I of course to create a list of fonts to exclude, but things change, Apple or Microsoft might add Webding27 next week

I have a method to determine if a font is fixed with (Courier, Menlo etc) by comparing the width of “l” vs “W” which works
parts of this app just need an “ABC…XYZ” font, other parts must have a fixed width font

The fallback is to allow all the fonts, and let the user sort it out, but I’d like to shorten the list

I would have thought the defined script that the font supported would tell you but that doesn’t seem to be the case

Someone who designs fonts & packages them might be able to tell you though

That is IMHO the only way to go.

Don’t get caught into stuff that fortunately Unicode freed us from. If you limit in any way the user choice, you are bound to have support requests and will eventually have to implement everything.

Michel the point is… if someone writes in “Symbol” or “ZapfdingBat”… sure my app “knows” the “translation”, but writing code in “smiley” faces has no point… Regardless of you “native” language, the programming code requires “ABC…XYZ”

but if it can’t be done, I’ll let the user deal with the consequences…

What do you mean coding in smiley faces has no point?
http://www.emojicode.org :stuck_out_tongue:

I would agree with letting the user deal with the consequences of trying a font they can’t read.

Do you want to use MBS DynaPDF Plugin and it’s abilities to get information from system fonts?

(part of OmegaBundle) currently.

Christian… why bother asking… you know my answer… but it did give you a chance to plug MBS again I guess

Well, it’s just an offer.
To get cross platform things, you need some Library which is cross platform and DynaPDF could be the solution…

I could of course also offer to write a class with declares for CoreText for the Mac part.
Not sure if Windows provides the features at all!
e.g. get list of glyphs in a font.

[quote=329782:@Dave S]Michel the point is… if someone writes in “Symbol” or “ZapfdingBat”… sure my app “knows” the “translation”, but writing code in “smiley” faces has no point… Regardless of you “native” language, the programming code requires “ABC…XYZ”

but if it can’t be done, I’ll let the user deal with the consequences…[/quote]

You never know when a user wants to do something like

dim s as string = "?????"

true but it would be more likely

SELECT * FROM table where xyz = "?????"

Fonts are messy and often inconsitent so I would say try and avoid it if possible.

However, if you have a real need to do this (or want to spend time on this as a research project) and don’t want to rely on 3rd party plug-ins to help, you will either have to write declares for each operating system or write code to read and interpret the font file tables.

The cmap table will tell you if the font is a symbol font.

The OS/2 table can also tell you which scripts / languages the font is supposed to support. However, this information is defined by the font foundry (ie: creator) and I have found by experience that it is usually wrong. The only semi-reliable way I have found to identify which scripts are used, is to check for the existence of glyphs within each Unicode range. This gets more complicated when dealing with CJK due to issues such as Han Unification as the glyph may not identify which script the font is for.