There are a couple of things that come to mind; first it's dangerous to assume that font file names are regular. I'm not sure myself as I look at the 600 or so fonts installed on my system(s) if I've ever seen rhyme or reason to the names. If you know otherwise then of course ignore the warning--YMMV. The other notion is that your module should have some means of telling you and the world if a particular font exists. One of the things missing from MSFT's bizarre approach to font tech is the idea of telling you that it can't find the font you are looking for; instead it cheerfully loads some other font that it thinks might be nice. Imagine trying this with symbol fonts---like say "Chess Alpha"! You might find http://www.codeproject.com/gdi/fontfile.asp useful.

--hsm

"Never try to teach a pig to sing...it wastes your time and it annoys the pig."

In reply to Re: Win32 Module to return font filename from full font name/weight/slant ? by hsmyers
in thread Win32 Module to return font filename from full font name/weight/slant ? by renodino

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.