What font is REALLY being used

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
KimD
Posts: 225
Joined: Wed Jul 08, 2015 5:51 am

What font is REALLY being used

Post by KimD » Wed Jun 15, 2016 10:07 pm

Two, hopefully simple, questions about fonts on Android:

1) My internet reading had lead me to believe that the Roboto font was factory installed on all Android devices from Android 4.0 (or 4.1) onwards, but when I use LC's "the font names" on my Android 5.01 device the result is as follows:
(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)
Droid Sans
Droid Sans Mono
Droid Serif

Why is Roboto missing from this list?
a) Does the fontnames not detect Roboto
b) Is Roboto there but named as Default (or something similar)
c) Has my test Android 5.01 Moto G had a bad experience in life and lost its Roboto
d) Or is what I've read on the internet about Roboto being factory installed on all Android 4.0 (or 4.1) onwards devices just a load of b******s?

2) How can I determine what font LC is really using to draw a specific control? I know how to load and set fonts, and how to use the property inspector to view fonts, but in cases where "something goes wrong" LC SEEMS to use another (default???) font. What's the LC code for - Answer the ACTUALfontTHATisREALLYreallyBEINGused of button "ABC" ?

Thanks in advance

Kim

LC8.0.1 - Windows 7 and OSX 10.11.5

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: What font is REALLY being used

Post by FourthWorld » Wed Jun 15, 2016 10:22 pm

KimD wrote:Why is Roboto missing from this list?
b) Is Roboto there but named as Default (or something similar)
Being the system font, that would be my guess. Would be good to get some clarification from the devs on that.
How can I determine what font LC is really using to draw a specific control?
Check "the effective textFont of..."
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

KimD
Posts: 225
Joined: Wed Jul 08, 2015 5:51 am

Re: What font is REALLY being used

Post by KimD » Thu Jun 16, 2016 12:09 am

Thanks Richard

The effective textfont answers "Roboto", even though "Roboto" isn't listed by "the fontnames". So it looks like you may be right - "Roboto" is being renamed as default or something similar.

Now I'm having second thoughts about using Roboto, as it looks terrible in bold. It looks fine as plain text, but in bold there just isn't enough horizontal space between the letters.

Regards

Kim

KimD
Posts: 225
Joined: Wed Jul 08, 2015 5:51 am

Re: What font is REALLY being used

Post by KimD » Thu Jun 16, 2016 1:30 am

I found this Livecode post - http://livecodejournal.com/forum/viewto ... ?f=24&t=47

Which PARTIALLY explains why I'm not seeing Roboto in "the fontnames"

So I then did some more experimenting.

1) I created a new stack
2) Added the following code in the preopenstack, to display the 4 fonts that the post states are "built in" to Android.
On PreOpenStack
Set the textfont of field "TextTest1" to "Droid Sans"
Set the textfont of field "TextTest2" to "Droid Sans Mono"
Set the textfont of field "TextTest3" to "Droid Serif"
Set the textfont of field "TextTest4" to "Roboto"
Set the textfont of field "TextTest5" to "Droid Sans"
Set the textfont of field "TextTest6" to "Droid Sans Mono"
Set the textfont of field "TextTest7" to "Droid Serif"
Set the textfont of field "TextTest8" to "Roboto"
Answer "I've just set the text fields to the four standard google fonts"
end PreOpenStack
3) deployed this new app onto a real Android 5.1 test device
4) the Answer commands projects its text
5) a screenshot of what I see after that is attached

The "set the textfont" commands don't seem to be doing anything.

I don't understand why I can't I utilise ANY of the "built in" fonts in Android.

Any help would be much appreciated.

Kim

LC8.0.1 / Windows 7 and OSX 10.11.5
Attachments
Screenshot_2016-06-16-12-01-45.png

KimD
Posts: 225
Joined: Wed Jul 08, 2015 5:51 am

Re: What font is REALLY being used

Post by KimD » Tue Jun 21, 2016 8:36 pm

This has been logged as a bug.

Post Reply