tangram-es icon indicating copy to clipboard operation
tangram-es copied to clipboard

Font style weight bold is not work in Android

Open whitespeed opened this issue 3 years ago • 3 comments

I set font style weight "bold" in text layer of built in demo , but it doesn't seem to have any change. See this pics.

RESULT: image

image

ENVIRONMENT:

Android Simalator & Android Galaxy & Android XiaoMI all Android Devices

whitespeed avatar Oct 19 '20 05:10 whitespeed

It looks like your screenshots are of the demo scene file from this repo. In the "fonts" section at the top of the file, you'll see that the "Open Sans" font (which is used for most of the text styling) only has files specified for the "regular, weight 400" and "italic, weight 400" faces.

When using custom fonts in a scene file, you must specify files for all the "faces" of the font that you want to use (bold, light, italic, etc.). A "font" is actually a collection of font faces, which are typically stored in separate files.

matteblair avatar Oct 19 '20 06:10 matteblair

Although now that I'm looking into this more closely, there may be other problems with specifying font weights with systems fonts. Gonna leave this issue open until I can investigate more.

matteblair avatar Oct 19 '20 07:10 matteblair

Although now that I'm looking into this more closely, there may be other problems with specifying font weights with systems fonts. Gonna leave this issue open until I can investigate more.

It seems there is not TTF or OTT fonts file in Android System.

whitespeed avatar Oct 25 '20 07:10 whitespeed