Page 1 of 1

CatchFont()

Posted: Fri Sep 02, 2005 9:13 pm
by Num3
This would be so wonderful !!!

:lol:

Re: CatchFont()

Posted: Sat Sep 03, 2005 12:48 am
by va!n
Num3 wrote:This would be so wonderful !!!

:lol:
:?: lol

Re: CatchFont()

Posted: Sat Sep 03, 2005 12:54 am
by traumatic
I know this is the "feature requests and wishlists" but did you see
this example code on using AddFontMemResourceEx() posted by
freedimension some time ago?

Code: Select all

i.l = 1
notok = #True
If OpenLibrary(1, "Gdi32.dll")
  proc.l = IsFunction(1, "AddFontMemResourceEx")
  If proc
    CallFunction(1, "AddFontMemResourceEx", ?font1_start, ?font1_end - ?font1_start, 0, @i)
    notok = #False
  EndIf
  CloseLibrary(1)
EndIf
If notok
  If CreateFile(0, "fixed_01.ttf")
    WriteData(?font1_start, ?font1_end - ?font1_start)
    CloseFile(0)
    AddFontResource_("fixed_01.ttf")
    SendMessage_(#HWND_BROADCAST,#WM_FONTCHANGE,0,0)
  Else
    MessageRequester("Fehler", "Konnte eine Resource nicht laden")
    End
  EndIf
EndIf
LoadFont(#fnt_small, "fixed_v01", 6)

...

DataSection
  font1_start:
  IncludeBinary "Data\fixed_01.ttf"
  font1_end:
EndDataSection 

Posted: Sat Sep 03, 2005 10:20 am
by Num3
Yup...

But i need it for Linux too...

It can be done (bmx can do it ;) )