|
Post by honkytonk on Aug 29, 2020 11:15:47 GMT
Hello, if we download a font in the right format, can we use it in a JB or LB code? If yes, how ? Thank for.
|
|
|
Post by tsh73 on Aug 29, 2020 12:32:18 GMT
My knowledge is shallow but I tell a thing or two 1. JB could use different fonts, changed by "font" command www.libertybasicuniversity.com/lb4help/How_to_Specify_Fonts.htm(Jb examples fonttest.bas, fontbug.bas) 2. There are "regular" fonts - with letters - and JB happily use them and "dingbat" fonts - with pictures instead of letters. (https://en.wikipedia.org/wiki/Dingbat) It seems JB could not use these (real pity), if you try to issue "font windings" it will revert to default font I used to know difference (apparently Windows sees the difference) but I forgot. 3. Installing fonts is system-wide task So you cannot just bundle font with your program - it has to be installed (likely some setup programs could do that, me never tried) 4. Now Unicode is the trend. JB does not supports Unicode, at all. So you cannot use characters with codes above 255 even if font have them. (so likely no use in Unicode fonts) Very likely LB could do more via Wndows API (I think I've seen using dingbats on button captions
EDIT I found it here www.alycesrestaurant.com/wingding.htm
and some usage of Unicode) - but it better be asked on LB forum
|
|
|
Post by honkytonk on Aug 29, 2020 18:09:41 GMT
What I'm asking is if I put a font in the folder with the code, can the code access it; it seems not. To have a special font, we need to create it (in sprites or bmp).
|
|
|
Post by Rod on Aug 29, 2020 19:26:59 GMT
what font are you trying to use. Wingding font wo t work but others should.
|
|
|
Post by B+ on Aug 29, 2020 19:30:07 GMT
Might depend on where JB looks for font files. Does it just assume they are in Windows Fonts folder?
Would it look in the folder of the source code? Does look for .ttf files with the name of your font?
How to Specify Fonts from JB Help does not seem to cover ones own choice fonts.
|
|
|
Post by tsh73 on Aug 29, 2020 20:59:53 GMT
JB should not look for font files It should ask Windows and Windows gives installed font I think there is no way to use font without installing it in Windows first.
|
|
|
Post by honkytonk on Aug 30, 2020 0:03:48 GMT
Might depend on where JB looks for font files. Does it just assume they are in Windows Fonts folder? Would it look in the folder of the source code? Does look for .ttf files with the name of your font? How to Specify Fonts from JB Help does not seem to cover ones own choice fonts. That's what I understood, I wanted confirmation. Thank for it.
|
|