Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages
Started by Daryl
Mon, 04 Sep 2006 10:06
Checking for a Font at start up
Author: Daryl
Date: Mon, 04 Sep 2006 10:06
Date: Mon, 04 Sep 2006 10:06
13 lines
1298 bytes
1298 bytes
I would like to see if a font (Tahoma) is available as the form is being constructed (or perhaps there is a better time) and if it is not available then make a substitution to say MS Sans Serif which is basically guaranteed to be available. The main reason I want to do this is to cater for 'Clear Type' used to improve the rendering of True fonts on LCD screens. Any information and perhaps tips on how to best do this will be most welcome. thanks daryl
Re: Checking for a Font at start up
Author: Thorsten Kettner
Date: Mon, 04 Sep 2006 10:39
Date: Mon, 04 Sep 2006 10:39
16 lines
1354 bytes
1354 bytes
"Daryl" <devaccount@hotmail.com> wrote:
>I would like to see if a font (Tahoma) is available as the
>form is being constructed (or perhaps there is a better time)
>and if it is not available then make a substitution to say MS
>Sans Serif which is basically guaranteed to be available.
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
if(Screen->Fonts->IndexOf("Tahoxma") != -1)
Font->Name = "Tahoma";
else
Font->Name = "MS Sans Serif";
...
}
Re: Checking for a Font at start up
Author: Thorsten Kettner
Date: Mon, 04 Sep 2006 10:41
Date: Mon, 04 Sep 2006 10:41
21 lines
1581 bytes
1581 bytes
Oops typo! Should read IndexOf("Tahoma") of course.
"Thorsten Kettner" <ANSWERBYthorsten.kettner@otto.de> wrote:
>
>"Daryl" <devaccount@hotmail.com> wrote:
>>I would like to see if a font (Tahoma) is available as the
>>form is being constructed (or perhaps there is a better time)
>>and if it is not available then make a substitution to say MS
>>Sans Serif which is basically guaranteed to be available.
>
>__fastcall TForm1::TForm1(TComponent* Owner)
> : TForm(Owner)
>{
> if(Screen->Fonts->IndexOf("Tahoxma") != -1)
> Font->Name = "Tahoma";
> else
> Font->Name = "MS Sans Serif";
> ...
>}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads