native.systemFontBold @android

Hello!

It seems that native.systemFontBold does not work for android.

I have used display.newText and newRetinaText.
Tested in simulator and device with no success.
Words with native.systemFont looks the same as native.systemFontBold.

Is this a bug or am I missing something?

Thank you! [import]uid: 38658 topic_id: 22953 reply_id: 322953[/import]

Hello,

I just had a look at the Android code. It looks like native.systemFontBold is ignored and it just defaults to native.systemFont instead. It looks like the Corona Simulator for Windows has the same problem. I’ll write this up as a bug to be fixed later.

In the meantime, you can work-around this issue by setting the font explicitly. My understanding is that all Android devices come with the following bold font:
[lua] “DroidSans-Bold”[/lua]

So, you’ll want to do something like this in your code…
[lua]local font
if “Android” == system.getInfo(“platformName”) then
font = “DroidSans-Bold”
else
font = native.systemFontBold
end
display.newText(“Hello World!”, 0, 0, font, 16)[/lua]
[import]uid: 32256 topic_id: 22953 reply_id: 92007[/import]

Thank you Joshua for the reply! [import]uid: 38658 topic_id: 22953 reply_id: 92010[/import]

Just wondering if this has been fixed? Still seeing this issue when deploying to my Galaxy Nexus phone.

Build: 2013.1143 (2013.6.18)

Thanks!

We’ve added “native.systemFontBold” support to Android as of daily build #1079, which was last April.

Just wondering if this has been fixed? Still seeing this issue when deploying to my Galaxy Nexus phone.

Build: 2013.1143 (2013.6.18)

Thanks!

We’ve added “native.systemFontBold” support to Android as of daily build #1079, which was last April.

I have that problem too.

I am using:

  • Corona build 2014.2152

  • Nexus 5 (Android 4.4.2)

I have that problem too.

I am using:

  • Corona build 2014.2152

  • Nexus 5 (Android 4.4.2)

The problem persists, “native.systemFontBold” is still ignored in Windows simulation and on our two Android devices:

  • Asus MeMO Pad HD 7 (ME173), Android 4.2.2

  • Acer Iconia Tab A700, Android 4.1.1

(currently using Corona build 2014.2382)

Any chance of this getting fixed?

Thanks!

We’ve never added support for “systemFontBold” on Windows.  Adding support hasn’t been a priority.

“systemFontBold” definitely works on Android.  The native API that we invoke to select the default bold font is being used.  But remember that this uses the default font selected by the manufacturer, which will be different between devices.  That is, different Android devices and/or OS versions may use different default fonts and that the default font selected by the manufacturer might be less bold or not bold if that’s what they chose.  This is out of our control, but that said, the font you’ll be using will be consistent with other apps on the same device.  If you want absolute control of your font, then your only option is to include your own custom font with your app and use that instead.

I am not seeing bold font on my Galaxy S3 when I use systemFontBold

can anyone confirm this works? I am on build 2381 

The problem persists, “native.systemFontBold” is still ignored in Windows simulation and on our two Android devices:

  • Asus MeMO Pad HD 7 (ME173), Android 4.2.2

  • Acer Iconia Tab A700, Android 4.1.1

(currently using Corona build 2014.2382)

Any chance of this getting fixed?

Thanks!

We’ve never added support for “systemFontBold” on Windows.  Adding support hasn’t been a priority.

“systemFontBold” definitely works on Android.  The native API that we invoke to select the default bold font is being used.  But remember that this uses the default font selected by the manufacturer, which will be different between devices.  That is, different Android devices and/or OS versions may use different default fonts and that the default font selected by the manufacturer might be less bold or not bold if that’s what they chose.  This is out of our control, but that said, the font you’ll be using will be consistent with other apps on the same device.  If you want absolute control of your font, then your only option is to include your own custom font with your app and use that instead.

I am not seeing bold font on my Galaxy S3 when I use systemFontBold

can anyone confirm this works? I am on build 2381