The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
[android]FT_Open_Face is very slow
ancientli


Joined: 01 Jul 2015
Posts: 45
Using version: SDL2-2.0.4, SDL2_ttf-2.0.14

On android, if font file is at Asset, FT_Open_Face is very slow, for example to 350 milliseconds. But same device and same code, if font file at sdcard, spend time reduced to 1 milliseconds!

Used Font files like Andagii.ttf, DejaVuSans.ttf, wqy-zenhei.ttc.

What is result in it?
Re: [android]FT_Open_Face is very slow
rtrussell


Joined: 10 Feb 2016
Posts: 88
ancientli wrote:
On android, if font file is at Asset, FT_Open_Face is very slow, for example to 350 milliseconds.

My guess is that this is the time taken to decompress the file (most files in assets are stored in a compressed format). You could choose to disable compression for ttf files, but it would make your app package larger.

Richard.