Gah.
>From 6e38dbc9ecc51284f95810a48d1723b5754814d8 Mon Sep 17 00:00:00 2001
From: Nikolaus Waxweiler <[email protected]>
Date: Sun, 13 Nov 2016 21:22:28 +0100
Subject: [PATCH] Guard subpixel code behind define, fixes build without
subpixel hinting
---
src/base/ftobjs.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 5d23210..8d07bee 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2363,7 +2363,9 @@
/* initialize internal face data */
{
FT_Face_Internal internal = face->internal;
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
static const FT_Byte lcd_weights[5] = { 0 };
+#endif
internal->transform_matrix.xx = 0x10000L;
@@ -2377,7 +2379,9 @@
internal->refcount = 1;
internal->stem_darkening = -1;
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
ft_memcpy( internal->lcd_weights, lcd_weights, 5 );
+#endif
}
@@ -3563,6 +3567,7 @@
}
else if ( parameters->tag == FT_FACE_OPTION_SET_LCD_FILTER_WEIGHTS )
{
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
if ( parameters->data )
ft_memcpy( face->internal->lcd_weights, parameters->data, 5 );
else /* NULL == no custom weights, use library default. Signaled by
@@ -3571,6 +3576,10 @@
FT_Byte no_weight[5] = { 0 };
ft_memcpy( face->internal->lcd_weights, no_weight, 5 );
}
+#else
+ error = FT_THROW( Unimplemented_Feature );
+ goto Exit;
+#endif
}
else
{
--
2.9.3
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel