|
|
|
@ -30,6 +30,7 @@ |
|
|
|
|
|
|
|
|
|
#include "hb-open-type.hh" |
|
|
|
|
#include "hb-ot-layout-common.hh" |
|
|
|
|
#include "hb-paint.hh" |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* sbix -- Standard Bitmap Graphics |
|
|
|
@ -231,6 +232,24 @@ struct sbix |
|
|
|
|
num_glyphs, available_ppem); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const |
|
|
|
|
{ |
|
|
|
|
if (!has_data ()) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
int x_offset = 0, y_offset = 0; |
|
|
|
|
unsigned int strike_ppem = 0; |
|
|
|
|
hb_blob_t *blob = reference_png (font, glyph, &x_offset, &y_offset, &strike_ppem); |
|
|
|
|
|
|
|
|
|
if (blob == hb_blob_get_empty ()) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
funcs->image (data, glyph); |
|
|
|
|
|
|
|
|
|
hb_blob_destroy (blob); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
|
|
const SBIXStrike &choose_strike (hb_font_t *font) const |
|
|
|
|