#include FT_SYNTHESIS_H
#include FT_GLYPH_H
#include FT_TRUETYPE_TABLES_H
+#include FT_OUTLINE_H
#include "ass.h"
#include "ass_library.h"
return 1;
}
+/**
+ * Slightly embold a glyph without touching its metrics
+ */
+static void ass_glyph_embolden(FT_GlyphSlot slot)
+{
+ int str;
+
+ if (slot->format != FT_GLYPH_FORMAT_OUTLINE)
+ return;
+
+ str = FT_MulFix(slot->face->units_per_EM,
+ slot->face->size->metrics.y_scale) / 64;
+
+ FT_Outline_Embolden(&slot->outline, str);
+}
+
/**
* \brief Get a glyph
* \param ch character code
(font->desc.italic > 55)) {
FT_GlyphSlot_Oblique(face->glyph);
}
+
+ if (!(face->style_flags & FT_STYLE_FLAG_BOLD) &&
+ (font->desc.bold > 80)) {
+ ass_glyph_embolden(face->glyph);
+ }
#endif
error = FT_Get_Glyph(face->glyph, &glyph);
if (error) {