FBTrueType static Win/Lin 32/64-bit

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
fxm
Posts: 8361
Joined: Apr 22, 2009 12:46
Location: Paris (suburb), FRANCE

Re: FBTrueType static Win/Lin 32/64-bit

Postby fxm » May 05, 2018 8:12

Compile with a FB version >= 1.04.0 (1.05.0 for example).
heisenberg
Posts: 4
Joined: May 04, 2018 18:42

Re: FBTrueType static Win/Lin 32/64-bit

Postby heisenberg » May 05, 2018 9:01

The best solutions are the simple ones.
An update solved the problem.
The font looks great in my programs.

Thanks for the tip!

steve
D.J.Peters
Posts: 7433
Joined: May 28, 2005 3:28

Re: FBTrueType static Win/Lin 32/64-bit

Postby D.J.Peters » May 05, 2018 16:51

Hello Mr. Werner Karl Heisenberg :-)

"DrawStringCreateBitmap.bas" is only to create a bitmap font from TrueType font.

I added "DrawStringTestBitmap.bas" also.

Joshy
Last edited by D.J.Peters on May 06, 2018 13:29, edited 1 time in total.
D.J.Peters
Posts: 7433
Joined: May 28, 2005 3:28

Re: FBTrueType static Win/Lin 32/64-bit

Postby D.J.Peters » May 05, 2018 17:55

I added LoadFontBitmap(), getFontInfo(), getFontHeight() and getTextWidth() see file "FBTrueType.bi"
and found out something goes wrong the lowercase letter "g" has some wrong pixels ?
Image
Is it "test06.bas" that create the bitmap or Draw String it's self ?

May be the wrong pixels comes from "f" letter in front of the"g" letter
inside the font bitmap I must do a deeper look on it.

Joshy
Last edited by D.J.Peters on May 05, 2018 21:00, edited 1 time in total.
D.J.Peters
Posts: 7433
Joined: May 28, 2005 3:28

Re: FBTrueType static Win/Lin 32/64-bit

Postby D.J.Peters » May 05, 2018 18:25

I put LoadFontBitmap(), getFontInfo(), getFontHeight() and getTextWidth() in file: FBTrueType.bi
as a bad workaround I added one dummy pixel to the char width table.

Joshy
Last edited by D.J.Peters on May 06, 2018 13:29, edited 1 time in total.
marcov
Posts: 2629
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: FBTrueType static Win/Lin 32/64-bit

Postby marcov » May 05, 2018 18:52

Hmm. Mr. Heisenberg's post have timestamp, but not location. Hmm :-)

(*) https://en.wikipedia.org/wiki/Uncertainty_principle
D.J.Peters
Posts: 7433
Joined: May 28, 2005 3:28

Re: FBTrueType static Win/Lin 32/64-bit

Postby D.J.Peters » May 05, 2018 20:53

Image
I found and fixed the problem :-)
Image
Delete your old FBTrueType folder and download and extract the zip file again.

I gave the tests more meaningful names
GlyphIndex.bas
ShowBoundingBox.bas
LowLevel.bas
TTPrintString.bas
TTPrintWString.bas
DrawStringCreateBitmap.bas
DrawStringTestBitmap.bas

Joshy
heisenberg
Posts: 4
Joined: May 04, 2018 18:42

Re: FBTrueType static Win/Lin 32/64-bit

Postby heisenberg » May 06, 2018 9:51

Wow! Thanks, Joshy!
As always: Great work and support.
As a real rookie to FB, i really appreciate that.
(I learned to code with Turbo Pascal, ages ago)
Gonna update files and check it as soon as i find time.
Damn real life :)

@marcov: Lol!
But in fact, i'm more a fan of LaPlace and his determinism theory.
https://en.wikipedia.org/wiki/Laplace%27s_demon

steve
heisenberg
Posts: 4
Joined: May 04, 2018 18:42

Re: FBTrueType static Win/Lin 32/64-bit

Postby heisenberg » May 06, 2018 10:02

@joshy:

Something off-topic:
I'm a musician/guitarist, and the reason i start to try working with FB is to
write some kind of "composing tools" (for easier re-harmonizing, for example).
Since you seem to be a musician too: Did you ever work on something like this?
I mean something music related?
Just curious.

steve
D.J.Peters
Posts: 7433
Joined: May 28, 2005 3:28

Re: FBTrueType static Win/Lin 32/64-bit

Postby D.J.Peters » May 06, 2018 12:47

@Steve I wrote Paganini a MIDI sequencer with some audio tracks 20 years ago, yes I'm old ;-)

Currently I try to fix a bug in FBSound V1.0 section DSP effects fbs_PitchShifter()
my optimized 32-bit assembler version is OK but the devil are in 64-bit mode.

Looks like I have to rewrite a none optimized version
and make it faster and faster step by step in 64-bit mode.

With other words after all the years I self don't understand
my optimized version any more and lost the original code of the slow version :-)

In your case for a composing tool I self would use FLTK-c as a fast GUI and FBSound for audio playback.

Joshy
paul doe
Posts: 782
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FBTrueType static Win/Lin 32/64-bit

Postby paul doe » May 15, 2018 10:27

Hi, Joshy

When I run the 'DrawStringTestBitmap.bas' file, my OS is reporting a modest ~2 GB memory usage =D:

Image

LOL!

Can you confirm it, or is it just my craptop doing funny things again? Thanks.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest