Fontconfig on Android is slow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux