
http://www.freebasic-portal.de/download ... nt-88.html
Mutton
Normaly you can use the Freetype rendered font glyph (it's a 8-bit alphachannel bitmap) perfectly with the put() command.leopardpm wrote:(why can't FB just directly access the windows OTF, TTF, etc fonts with a command?)
I guess what I am not understanding is that the font information is just basically mathematical descriptions of arcs and curves in a shape (and I think there is also additional 'hint' info for particular letters/numbers) - isn't it possible to render this data on the fly? I gather Mutton's code must do that to convert the font to a bitmap, why not skip the step of making a bitmap which needs to be saved and just render directly?D.J.Peters wrote:Normaly you can use the Freetype rendered font glyph (it's a 8-bit alphachannel bitmap) perfectly with the put() command.leopardpm wrote:(why can't FB just directly access the windows OTF, TTF, etc fonts with a command?)
The problem are in fbgfx a width of a bitmap row must be a multiply of 16 bytes.
Freetype can render for examlple an "I" truetype glyph with 5x8 pixels and 5 isn't a multiply of 16.
You know ?
Joshy
Code: Select all
type myUDT
var1 as integer
var2 as integer
var3 as integer
end type
dim myType as myUDT 'create UDT in memory
dim myPtr as myUDT ptr 'create a pointer of type myUDT
myPtr = @myType 'point to our UDT
Code: Select all
myPtr.var1 = value 'assign value to var1 using myPtr???
Code: Select all
myPtr->var1 = value 'correct pointer notation to assign value to var1
You are right but this are only the half of the story :-)BasicCoder2 wrote:...However, this is incorrect. The dot notation is only used for variables, not pointers. With a pointer we need to use the "->" symbol.
Code: Select all
*myPtr.value = xyz
Code: Select all
with *myPtr
.value = xyz
end with