Lines 58-63
Link Here
|
58 |
#include <ft2build.h> |
58 |
#include <ft2build.h> |
59 |
#include FT_FREETYPE_H |
59 |
#include FT_FREETYPE_H |
60 |
#include FT_OUTLINE_H |
60 |
#include FT_OUTLINE_H |
|
|
61 |
#include FT_SYNTHESIS_H |
61 |
#include FT_TRUETYPE_TABLES_H |
62 |
#include FT_TRUETYPE_TABLES_H |
62 |
#include FT_TYPE1_TABLES_H |
63 |
#include FT_TYPE1_TABLES_H |
63 |
#include FT_GLYPH_H |
64 |
#include FT_GLYPH_H |
Lines 617-622
Link Here
|
617 |
cache_cost = 100; |
618 |
cache_cost = 100; |
618 |
kerning_pairs_loaded = false; |
619 |
kerning_pairs_loaded = false; |
619 |
transform = false; |
620 |
transform = false; |
|
|
621 |
embolden = false; |
620 |
antialias = true; |
622 |
antialias = true; |
621 |
freetype = 0; |
623 |
freetype = 0; |
622 |
default_load_flags = 0; |
624 |
default_load_flags = 0; |
Lines 690-695
Link Here
|
690 |
freetype->matrix = matrix; |
692 |
freetype->matrix = matrix; |
691 |
if (fake_oblique) |
693 |
if (fake_oblique) |
692 |
transform = true; |
694 |
transform = true; |
|
|
695 |
// fake bold |
696 |
if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD)) |
697 |
embolden = true; |
693 |
} else { |
698 |
} else { |
694 |
// copied from QFontEngineQPF |
699 |
// copied from QFontEngineQPF |
695 |
// ad hoc algorithm |
700 |
// ad hoc algorithm |
Lines 934-939
Link Here
|
934 |
return 0; |
939 |
return 0; |
935 |
|
940 |
|
936 |
FT_GlyphSlot slot = face->glyph; |
941 |
FT_GlyphSlot slot = face->glyph; |
|
|
942 |
if (embolden) FT_GlyphSlot_Embolden(slot); |
937 |
FT_Library library = qt_getFreetype(); |
943 |
FT_Library library = qt_getFreetype(); |
938 |
|
944 |
|
939 |
info.xOff = TRUNC(ROUND(slot->advance.x)); |
945 |
info.xOff = TRUNC(ROUND(slot->advance.x)); |
Lines 1209-1214
Link Here
|
1209 |
int s = 0; |
1215 |
int s = 0; |
1210 |
if ((fontDef.style != QFont::StyleNormal) && !(freetype->face->style_flags & FT_STYLE_FLAG_ITALIC)) |
1216 |
if ((fontDef.style != QFont::StyleNormal) && !(freetype->face->style_flags & FT_STYLE_FLAG_ITALIC)) |
1211 |
s = SynthesizedItalic; |
1217 |
s = SynthesizedItalic; |
|
|
1218 |
if ((fontDef.weight == QFont::Bold) && !(freetype->face->style_flags & FT_STYLE_FLAG_BOLD)) |
1219 |
s |= SynthesizedBold; |
1212 |
if (fontDef.stretch != 100 && FT_IS_SCALABLE(freetype->face)) |
1220 |
if (fontDef.stretch != 100 && FT_IS_SCALABLE(freetype->face)) |
1213 |
s |= SynthesizedStretch; |
1221 |
s |= SynthesizedStretch; |
1214 |
return s; |
1222 |
return s; |