[config] Add HB_NO_HINTING, enabled by HB_TINY
Disables HintingDevice tables and Anchors addressing contour points. Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
a849873124
commit
c8f529a07e
|
@ -58,7 +58,7 @@
|
|||
#define HB_NO_CFF
|
||||
#define HB_NO_COLOR
|
||||
#define HB_NO_GETENV
|
||||
#define HB_NO_OT_FONT_GLYPH_NAMES
|
||||
#define HB_NO_HINTING
|
||||
#define HB_NO_LANGUAGE_PRIVATE_SUBTAG
|
||||
#define HB_NO_LAYOUT_UNUSED
|
||||
#define HB_NO_MATH
|
||||
|
@ -66,6 +66,7 @@
|
|||
#define HB_NO_NAME
|
||||
#define HB_NO_OPEN
|
||||
#define HB_NO_SETLOCALE
|
||||
#define HB_NO_OT_FONT_GLYPH_NAMES
|
||||
#define HB_NO_OT_SHAPE_FRACTIONS
|
||||
#define HB_NO_STAT
|
||||
#define HB_NO_SUBSET_LAYOUT
|
||||
|
|
|
@ -2166,8 +2166,10 @@ struct Device
|
|||
{
|
||||
switch (u.b.format)
|
||||
{
|
||||
#ifndef HB_NO_HINTING
|
||||
case 1: case 2: case 3:
|
||||
return u.hinting.get_x_delta (font);
|
||||
#endif
|
||||
#ifndef HB_NO_VAR
|
||||
case 0x8000:
|
||||
return u.variation.get_x_delta (font, store);
|
||||
|
@ -2181,7 +2183,9 @@ struct Device
|
|||
switch (u.b.format)
|
||||
{
|
||||
case 1: case 2: case 3:
|
||||
#ifndef HB_NO_HINTING
|
||||
return u.hinting.get_y_delta (font);
|
||||
#endif
|
||||
#ifndef HB_NO_VAR
|
||||
case 0x8000:
|
||||
return u.variation.get_y_delta (font, store);
|
||||
|
@ -2196,8 +2200,10 @@ struct Device
|
|||
TRACE_SANITIZE (this);
|
||||
if (!u.b.format.sanitize (c)) return_trace (false);
|
||||
switch (u.b.format) {
|
||||
#ifndef HB_NO_HINTING
|
||||
case 1: case 2: case 3:
|
||||
return_trace (u.hinting.sanitize (c));
|
||||
#endif
|
||||
#ifndef HB_NO_VAR
|
||||
case 0x8000:
|
||||
return_trace (u.variation.sanitize (c));
|
||||
|
|
|
@ -267,6 +267,13 @@ struct AnchorFormat2
|
|||
float *x, float *y) const
|
||||
{
|
||||
hb_font_t *font = c->font;
|
||||
|
||||
#ifdef HB_NO_HINTING
|
||||
*x = font->em_fscale_x (xCoordinate);
|
||||
*y = font->em_fscale_y (yCoordinate);
|
||||
return;
|
||||
#endif
|
||||
|
||||
unsigned int x_ppem = font->x_ppem;
|
||||
unsigned int y_ppem = font->y_ppem;
|
||||
hb_position_t cx = 0, cy = 0;
|
||||
|
|
Loading…
Reference in New Issue