1

I would like to iterate through a long array of fonts and determine their statuses as fixed/non-fixed width and textual/symbolic fonts.

Is it possible, given an arbitrary font, to determine whether or not it is fixed-width or variable-width? It certainly does not seem to be a simple, single variable - some measurements probably need to be done. However, I would like to avoid having iconic or symbolic fonts register as such, which there also may not necessarily be a property for.

Southpaw Hare
  • 1,535
  • 3
  • 24
  • 50
  • 2
    check this question: [http://stackoverflow.com/questions/224865/how-do-i-get-all-installed-fixed-width-fonts](http://stackoverflow.com/questions/224865/how-do-i-get-all-installed-fixed-width-fonts) – Guido Preite Apr 04 '13 at 14:19
  • @GuidoPreite A very similar question and a decent answer, but I don't think it answers my question completely. What about symbolic fonts? And can I really trust this "tologfont"? – Southpaw Hare Apr 04 '13 at 15:06
  • Tim's answer to the linked question is correct. Yes, of course you can trust `ToLogFont`. It returns a Win32 [`LOGFONT`](http://msdn.microsoft.com/en-us/library/windows/desktop/dd145037.aspx) structure that describes the underlying font. Symbolic fonts carry metadata, too, so this will work fine for them. Measuring it yourself is the wrong way to do it. – Cody Gray - on strike Apr 19 '13 at 04:14
  • @CodyGray Is there a property in this structure than is able to distinguish symbolic, wing-ding, or otherwise standard textual fonts? – Southpaw Hare Apr 19 '13 at 21:52
  • 1
    The `FF_DECORATIVE` flag should be set for symbolic fonts like Wingdings. Check it like so: `If (logfont.lfPitchAndFamily And FF_DECORATIVE) = FF_DECORATIVE Then` – Cody Gray - on strike Apr 19 '13 at 21:55
  • @CodyGray Excellent! This would make a great answer, I feel. – Southpaw Hare Apr 19 '13 at 21:57
  • I was aiming to close the question as a duplicate of the linked one, that's why I didn't post an answer. I cast a vote myself, but this one is pretty old, it's probably not getting enough traffic to accumulate enough additional votes. – Cody Gray - on strike Apr 20 '13 at 00:05
  • @CodyGray Alright... well feel free to answer it, then. Your additional information about symbolic fonts is what makes my question differ from the other, is what I need, and is what you are providing. So I see no issue. – Southpaw Hare Apr 20 '13 at 01:59

0 Answers0