Hi,
Just another note, in debug mode, if no custom font is specified the console outputs:
not found, using sans-serif
-dev
Hi,
Just another note, in debug mode, if no custom font is specified the console outputs:
not found, using sans-serif
-dev
Any chance of allowing for fonts in sub-directories to work again?
Added loading fonts from sub-folders and .otf font support
.otf font support ** **
Thanks!
That’s awesome thanks!
can someone please share a complete working index.html file
i’m still unable to get this working
i updated my index.html file (attached)
and i placed the ttf file in the same folder of the index.html file (attaching A.Jannat.LT.Bold.ttf was declined by corona website!)
Are you wanting the font to work inside your Corona app or on the page framework surrounding the Corona app?
If the answer is the Corona app, then you should be putting the font in the folder with main.lua (or a sub-folder in the project) like you would for any iOS, Android or desktop build. You don’t need to have it in the folder with the index.html or update your HTML/CSS to load the font.
Not all font files are created equally and I have no idea how well that font will work in the HTML5 version of Corona (or the iOS/Android version for that matter). If you can’t get it to work, you should assemble a test project that has your main.lua, build.settings, config.lua, font files and have the main.lua try to draw a simple display.newText() object on the screen.
Build it for HTML, install it to a web server, share the link to the web page to show it not working, then put the files in a .zip folder and share it with us. You should also try a few different custom fonts to determine if the problem is with the specific font file.
Rob
Hi Rob,
i want the font to work inside Corona app …
attached is my entire code (font working on simulator but on web it shows browsers default font)
the font is in Arabic by the way.
It seems to work for me. What browser are you testing it in? I’m using Chrome on a Mac.
Rob
i attached 3 images for how the website looks on Internet Explorer, Firefox, and Chrome … all on Windows
each browser shows its default font … but none of them is how A.Jannat.LT.Bold.ttf looks like
Try to rename the font file and exclude dot characters from file name.
Thanks man it works now without the dots in the file name
I had this problem with previous daily builds, but from 3244 custom fonts working perfectly!
Strange. Mine are in a sub directory rather than simply in the project root. Are yours?
I just did a test and my custom fonts are working, but they are in the root. I need to find a project where they are in a sub-directory.
Rob
from 3244 text renderer uses browser’s fonts
What?
I need custom? for example
I meant Operation system fonts. ‘Howto’ use custom fonts will be soon
It will be great. Our new game work perfectly on HTML5! I am impressed! Shaders, physics - all work smoothly!