[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 40103a3 2/5: [autofit] Code clean-up.
From: |
Werner LEMBERG |
Subject: |
[freetype2] master 40103a3 2/5: [autofit] Code clean-up. |
Date: |
Fri, 04 Sep 2015 08:30:30 +0000 |
branch: master
commit 40103a3af089857e553f39c3b9ce61a9ee38dd59
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>
[autofit] Code clean-up.
* src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
(AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
Updated.
---
ChangeLog | 10 ++++++++++
src/autofit/afglobal.c | 6 +++---
src/autofit/afglobal.h | 8 ++++++--
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5d27489..84ae8fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2015-08-30 Werner Lemberg <address@hidden>
+ [autofit] Code clean-up.
+
+ * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
+ (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
+
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ Updated.
+
+2015-08-30 Werner Lemberg <address@hidden>
+
[autofit] Make glyph style array use 16bit values.
* include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index d908370..cd0e2ab 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -249,9 +249,9 @@
for ( nn = 0; nn < globals->glyph_count; nn++ )
{
- if ( ( gstyles[nn] & ~AF_DIGIT ) == AF_STYLE_UNASSIGNED )
+ if ( ( gstyles[nn] & AF_STYLE_MASK ) == AF_STYLE_UNASSIGNED )
{
- gstyles[nn] &= ~AF_STYLE_UNASSIGNED;
+ gstyles[nn] &= ~AF_STYLE_MASK;
gstyles[nn] |= globals->module->fallback_style;
}
}
@@ -275,7 +275,7 @@
for ( idx = 0; idx < globals->glyph_count; idx++ )
{
- if ( ( gstyles[idx] & ~AF_DIGIT ) == style_class->style )
+ if ( ( gstyles[idx] & AF_STYLE_MASK ) == style_class->style )
{
if ( !( count % 10 ) )
FT_TRACE4(( " " ));
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index 6cacd69..284f6a0 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -72,8 +72,12 @@ FT_BEGIN_HEADER
#endif
/* default script for OpenType; ignored if HarfBuzz isn't used */
#define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN
- /* a bit mask indicating an uncovered glyph */
-#define AF_STYLE_UNASSIGNED 0x7FFF
+
+ /* a bit mask for TA_DIGIT */
+#define AF_STYLE_MASK 0x7FFF
+ /* an uncovered glyph */
+#define AF_STYLE_UNASSIGNED AF_STYLE_MASK
+
/* if this flag is set, we have an ASCII digit */
#define AF_DIGIT 0x8000U
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 40103a3 2/5: [autofit] Code clean-up.,
Werner LEMBERG <=