CatchFont()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

CatchFont()

Post by Num3 »

This would be so wonderful !!!

:lol:
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Re: CatchFont()

Post by va!n »

Num3 wrote:This would be so wonderful !!!

:lol:
:?: lol
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: CatchFont()

Post 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 
Good programmers don't comment their code. It was hard to write, should be hard to read.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Yup...

But i need it for Linux too...

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