Lines 1328-1334
Link Here
|
1328 |
static int |
1328 |
static int |
1329 |
_get_pattern_load_flags (FcPattern *pattern) |
1329 |
_get_pattern_load_flags (FcPattern *pattern) |
1330 |
{ |
1330 |
{ |
1331 |
FcBool antialias, vertical_layout, hinting, autohint; |
1331 |
FcBool antialias, vertical_layout, hinting, autohint, bitmap; |
|
|
1332 |
FcBool transform; |
1333 |
FcMatrix *font_matrix; |
1332 |
int rgba; |
1334 |
int rgba; |
1333 |
#ifdef FC_HINT_STYLE |
1335 |
#ifdef FC_HINT_STYLE |
1334 |
int hintstyle; |
1336 |
int hintstyle; |
Lines 1336-1349
Link Here
|
1336 |
int load_flags = 0; |
1338 |
int load_flags = 0; |
1337 |
int target_flags = 0; |
1339 |
int target_flags = 0; |
1338 |
|
1340 |
|
|
|
1341 |
#ifndef FC_EMBEDDED_BITMAP |
1342 |
#define FC_EMBEDDED_BITMAP "embeddedbitmap" |
1343 |
#endif |
1344 |
|
1345 |
if (FcPatternGetMatrix (pattern, |
1346 |
FC_MATRIX, 0, &font_matrix) != FcResultMatch) |
1347 |
font_matrix = NULL; |
1348 |
|
1349 |
transform = (font_matrix && (font_matrix->xx != 1 || font_matrix->xy != 0 || |
1350 |
font_matrix->yx != 0 || font_matrix->yy != 1)); |
1351 |
|
1352 |
/* Check whether to use embedded bitmap forcely */ |
1353 |
if (FcPatternGetBool (pattern, |
1354 |
FC_EMBEDDED_BITMAP, 0, &bitmap) != FcResultMatch) |
1355 |
bitmap = FcFalse; |
1356 |
|
1339 |
/* disable antialiasing if requested */ |
1357 |
/* disable antialiasing if requested */ |
1340 |
if (FcPatternGetBool (pattern, |
1358 |
if (FcPatternGetBool (pattern, |
1341 |
FC_ANTIALIAS, 0, &antialias) != FcResultMatch) |
1359 |
FC_ANTIALIAS, 0, &antialias) != FcResultMatch) |
1342 |
antialias = FcTrue; |
1360 |
antialias = FcTrue; |
1343 |
|
1361 |
|
1344 |
if (antialias) |
1362 |
if ((!bitmap && antialias) || transform) |
1345 |
load_flags |= FT_LOAD_NO_BITMAP; |
1363 |
load_flags |= FT_LOAD_NO_BITMAP; |
1346 |
else |
1364 |
else if (!antialias) |
1347 |
load_flags |= FT_LOAD_MONOCHROME; |
1365 |
load_flags |= FT_LOAD_MONOCHROME; |
1348 |
|
1366 |
|
1349 |
/* disable hinting if requested */ |
1367 |
/* disable hinting if requested */ |