[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master fd70512: [type42] Parse FontMatrix according to speci
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2] master fd70512: [type42] Parse FontMatrix according to specifications. |
Date: |
Fri, 07 Aug 2015 01:50:08 +0000 |
branch: master
commit fd70512eee757d59bbf46377151081b8d054746e
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>
[type42] Parse FontMatrix according to specifications.
* src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
does not need scaling by 1000. Units_per_EM are taken from the
embedded TrueType.
---
ChangeLog | 8 ++++++++
src/type42/t42parse.c | 10 ++--------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index de55ffa..50e2676 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-08-06 Alexei Podtelezhnikov <address@hidden>
+
+ [type42] Parse FontMatrix according to specifications.
+
+ * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
+ does not need scaling by 1000. Units_per_EM are taken from the
+ embedded TrueType.
+
2015-08-06 Werner Lemberg <address@hidden>
[autofit] Improve Arabic hinting.
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index 109e996..66107f3 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -252,7 +252,7 @@
FT_Int result;
- result = T1_ToFixedArray( parser, 6, temp, 3 );
+ result = T1_ToFixedArray( parser, 6, temp, 0 );
if ( result < 6 )
{
@@ -264,17 +264,11 @@
if ( temp_scale == 0 )
{
- FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" ));
+ FT_ERROR(( "t42_parse_font_matrix: invalid font matrix\n" ));
parser->root.error = FT_THROW( Invalid_File_Format );
return;
}
- /* Set Units per EM based on FontMatrix values. We set the value to */
- /* 1000 / temp_scale, because temp_scale was already multiplied by */
- /* 1000 (in t1_tofixed, from psobjs.c). */
-
- root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
-
/* we need to scale the values by 1.0/temp_scale */
if ( temp_scale != 0x10000L )
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master fd70512: [type42] Parse FontMatrix according to specifications.,
Alexei Podtelezhnikov <=