Hi, Peter


Max's code did the trick! Delphi Help does give examples whereas WinHelp 
does not. An example here would have saved a lot of time. Thanks for 
your help. I was just about to give up.



Bobby Clarke




Peter Luijer wrote:
>
>
> Hi Bobby,
>
> I've never embedded fonts in an application myself.
> The "normal" way would be by installing the required font alongside the
> application when distributed.
>
> After some research I found out that fonts in resources need to be ordinal
> values (so ABC isn't valid, but 123 is).
> Next problem I encountered was that the compiler gave me an "Invalid Font
> Format" error when I tried to compile this:
> ==========================
> 123 FONT "arial.ttf"
> ==========================
>
> I also tried a fon-font, but that gave me the same error as well:
> ==========================
> 123 FONT "coure.fon"
> ==========================
>
> The error suggests that there must be *some* font-format that is 
> supported,
> although I can't find anything about that.
> When I compile the resource with "TTF" as descriptor...
> ==========================
> 123 TTF "arial.ttf"
> ==========================
> ...it actually does compile, but I wonder if that would be the correct
> resource-type for TTF-fonts.
>
> Doing a search about this topic only gave me very few leads, but this 
> one's
> the most interesting:
> http://groups.google.com/group/comp.lang.pascal.delphi.components.misc/tree/ 
> <http://groups.google.com/group/comp.lang.pascal.delphi.components.misc/tree/>
> browse_frm/month/1999-10?_done=%2Fgroup%2Fcomp.lang.pascal.delphi.components
> .misc%2Fbrowse_frm%2Fmonth%2F1999-10%3F&
>
> Hope you'll succeed in your quest,
>
> Peter.
>
> -----Oorspronkelijk bericht-----
> Van: [email protected] <mailto:delphi-en%40yahoogroups.com> 
> [mailto:[email protected] 
> <mailto:delphi-en%40yahoogroups.com>]Namens
> Bobby Clarke
> Verzonden: zondag 28 juni 2009 13:56
> Aan: [email protected] <mailto:delphi-en%40yahoogroups.com>
> Onderwerp: Re: [delphi-en] Failure to use font as a resource
>
> Hi Peter
>
> Thanks for the response. I have tried several things:
>
> In the rc file, I added double quotes round the file name. I suspect
> that these are only necessary if there is a space in the file name
> somewhere. Anyway the result was the same.
>
> I was aware of the {$R 'MyResource.res' 'MyResource.rc'} syntax but had
> never got it to compile, even on Build and after modifying the rc file
> in case the compiler was really clever. I think that the quotes are not
> required. I had not tried it in the project file. I have now but still I
> cannot get it to compile. However, this is not a problem, as I can
> compile rc to res with the bat file containing brcc32.exe.
>
> In the rc file FONT gives an error whereas RT_FONT compiles without error.
>
> I had a look for my original discs but failed. I also looked for an
> on-line download of Resource Workshop but didn't find it anywhere.
>
> Has anyone used Fonts in a Resource file successfully?
>
> Bobby
>
> 
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.375 / Virus Database: 270.12.93/2206 - Release Date: 06/27/09 
> 17:55:00
>
>   


[Non-text portions of this message have been removed]

Reply via email to