Fonts on Android

Dan Friedman dan at
Tue Aug 27 18:53:34 EDT 2019


Thank you for the reply.  But, I don’t see how this helps.  I have two fonts:


After running FontInfo(), I see this:

*Barlow Bold
*Barlow Regular

When I set the font of my stack to "Barlow", everything (bold or not) comes up as Barlow Bold. 
When I set the font of my stack to "Barlow Regular", everything (bold or not) comes up as Barlow Regular.

Only thing I can think to do is to run thought EVERY object in my project and set the textFont of that control to "Barlow Bold" or "Barlow Regular".  Then there's text fields with mixed text...  Do I run through every text field and change the font of all bold text?   There has to be a way to map "Barlow Regular" to plain text, and "Barlow Bold" to bold text.  I must be missing something.


On 8/27/19, 3:07 PM, "Ralph DiMola" <rdimola at> wrote:

    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
    -----Original Message-----
    From: use-livecode [mailto:use-livecode-bounces at] 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
    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,
    use-livecode mailing list
    use-livecode at
    Please visit this url to subscribe, unsubscribe and manage your subscription

More information about the use-livecode mailing list