|
@@ -22,11 +22,13 @@
|
|
|
|
|
|
|
|
#undef interface // I don't know where this symbol is defined, but it interferes with FreeType.
|
|
#undef interface // I don't know where this symbol is defined, but it interferes with FreeType.
|
|
|
#include FT_OUTLINE_H
|
|
#include FT_OUTLINE_H
|
|
|
-#include FT_STROKER_H
|
|
|
|
|
#include FT_BBOX_H
|
|
#include FT_BBOX_H
|
|
|
#ifdef FT_BITMAP_H
|
|
#ifdef FT_BITMAP_H
|
|
|
#include FT_BITMAP_H
|
|
#include FT_BITMAP_H
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+#ifdef FT_STROKER_H
|
|
|
|
|
+#include FT_STROKER_H
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#include "config_text.h"
|
|
#include "config_text.h"
|
|
|
#include "config_util.h"
|
|
#include "config_util.h"
|
|
@@ -398,11 +400,17 @@ make_glyph(int character, int glyph_index) {
|
|
|
if (wo == WO_default) {
|
|
if (wo == WO_default) {
|
|
|
// If we weren't told an explicit winding order, ask FreeType to
|
|
// If we weren't told an explicit winding order, ask FreeType to
|
|
|
// figure it out. Sometimes it appears to guess wrong.
|
|
// figure it out. Sometimes it appears to guess wrong.
|
|
|
|
|
+#ifdef FT_ORIENTATION_FILL_RIGHT
|
|
|
if (FT_Outline_Get_Orientation(&slot->outline) == FT_ORIENTATION_FILL_RIGHT) {
|
|
if (FT_Outline_Get_Orientation(&slot->outline) == FT_ORIENTATION_FILL_RIGHT) {
|
|
|
wo = WO_right;
|
|
wo = WO_right;
|
|
|
} else {
|
|
} else {
|
|
|
wo = WO_left;
|
|
wo = WO_left;
|
|
|
}
|
|
}
|
|
|
|
|
+#else
|
|
|
|
|
+ // Hmm. Assign a right-winding (TTF) orientation if FreeType
|
|
|
|
|
+ // can't tell us.
|
|
|
|
|
+ wo = WO_right;
|
|
|
|
|
+#endif // FT_ORIENTATION_FILL_RIGHT
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (wo != WO_left) {
|
|
if (wo != WO_left) {
|
|
@@ -430,7 +438,7 @@ make_glyph(int character, int glyph_index) {
|
|
|
|
|
|
|
|
// Render the glyph if necessary.
|
|
// Render the glyph if necessary.
|
|
|
if (slot->format != ft_glyph_format_bitmap) {
|
|
if (slot->format != ft_glyph_format_bitmap) {
|
|
|
- FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL);
|
|
|
|
|
|
|
+ FT_Render_Glyph(slot, ft_render_mode_normal);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (bitmap.width == 0 || bitmap.rows == 0) {
|
|
if (bitmap.width == 0 || bitmap.rows == 0) {
|