[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-fontconfig
Subject: [Fontconfig] Fontconfig on Android is slow
From: Kuldeep Singh Dhaka <kuldeepdhaka9 () gmail ! com>
Date: 2016-01-28 11:29:58
Message-ID: 56A9F8E6.9070106 () gmail ! com
[Download RAW message or body]
Hello,
I have been trying to run Fontconfig on Android.
Im able to use Fontconfig to search font (success) BUT it takes around
~20second to return result.
Source: https://github.com/kuldeepdhaka/fontconfig/tree/android
(note: the inspiration branch also give same result)
here is the code that i use to search:
FcPattern* pat = FcNameParse("");/* also tried "Droid" */
FcPatternAddInteger(pat, FC_WEIGHT, FC_WEIGHT_NORMAL);
FcPatternAddInteger(pat, FC_SLANT, FC_SLANT_ROMAN);
FcConfigSubstitute(config, pat, FcMatchPattern);
FcDefaultSubstitute(pat);
FcResult result;
FcPattern *font = FcFontMatch(config, pat, &result);
if (font != NULL) {
FcChar8 *file = NULL;
if (FcPatternGetString(font, FC_FILE, 0, &file)
== FcResultMatch) {
//read font from filesystem path: file
}
FcPatternDestroy(font);
}
FcPatternDestroy(pat);
Currently there are 91 fonts in my /system/fonts.
Due to which the "app" become unresponsive till Fontconfig finish.
The delay is unacceptable.
Im looking for help on overcoming the problem.
--
Kuldeep Singh Dhaka
_______________________________________________
Fontconfig mailing list
Fontconfig@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/fontconfig
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic