realbasic-nug
[Top] [All Lists]

Re: Font Style detection

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Font Style detection
From: Charles Yeomans <charles at declareSub dot com>
Date: Sat, 30 Jun 2007 18:02:49 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <E6B8620C-A152-456C-BB87-802BE659AA21 at innernine dot com>
On Jun 30, 2007, at 5:23 PM, Juergen Schreck wrote:

> Hi -
>
> I need to cross-platform (MAC X / WIN) way to detect which fonts
> styles may be available for a font-family. It appears as though RB's
> Font function only lists out font families.
>
> E.g. On a Mac I'll get 'Arial' but actually the following fonts are
> available:
>
> Arial
> Arial-Bold
> Arial-Italic
> Arial-BoldItalic
>
> They're all in the Arial 'suitcase', but they're seperate TrueType
> outline fonts. I need to distinguish that because the output the
> application produces requires outline fonts to be available.
>
> At first I thought this might only be a Mac problem because of the
> way that fonts can packed. But I encounter similar results on
> Windows. A look at the Fonts folder on my Windows system reveals 4
> files:
>
> arial.ttf
> arialbd.ttf
> arialbi.ttf
> ariali.ttf
>
> But again RB only reports 'Arial'.
>
> Can anyone throw me some pointers as to how to resolve that problem?


For Mac OS, you can parse the TextStyleData.  How to do that is on my  
web site -- <http://www.declaresub.com/iDeclare/CarbonEvents/ 
index.html>, in the section on the Font Panel.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>