Fonts on Android
Ralph DiMola
rdimola at evergreeninfo.net
Tue Aug 27 18:08:56 EDT 2019
When I run into this problem I use the routine below to enumerate all the
fonts and their styles.
If you have both a "Plain" and "Bold" style for a font then you use the font
name and set its style to "Bold"
If you use a "bold" base font then its "plain" style IS the bold font and
setting its style to "Bold" will do nothing.
function FontInfo
local fnames,fstyles,tlist
put the fontnames into fnames
sort fnames
repeat for each line tfnt in fnames
put "*"&tfnt&cr after tlist
put the fontstyles(tfnt,0) into fstyles
repeat for each line tsty in fstyles
put space & tsty & cr after tlist
end repeat
end repeat
delete char -1 in tlist
return tlist
end FontInfo
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Dan Friedman via use-livecode
Sent: Tuesday, August 27, 2019 5:11 PM
To: How to use LiveCode
Cc: Dan Friedman
Subject: Fonts on Android
Greetings!
I am able to get a custom font installed and running on a Android device.
But, how do you handle the font family? Included in my app is
"myfont-Regular.ttf" and "myfont-bold.ttf". When the app launches, I call:
set the textFont of stack "main" to "myfont"
It's only using the bold version (probably because it's first
alphabetically). Is there a way to map a font to a style so that text is "
myfont-Regular" and bold text is "myfont-bold"?
Thanks in advance,
-Dan
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list