[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 1b6dce84f 1/2: * src/type1/t1afm.c (T1_Read_PFM): Set
From: |
Werner Lemberg |
Subject: |
[freetype2] master 1b6dce84f 1/2: * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly. |
Date: |
Mon, 3 Oct 2022 19:30:04 -0400 (EDT) |
branch: master
commit 1b6dce84f946fd784bf0882c8f6e20dc04a3110a
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
* src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
As with the previous commit, we can avoid the validation checks
of `FT_Set_Charmap` and set it directly when choosing from the
available list.
---
src/type1/t1afm.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 6009e9ee2..db608799c 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -178,7 +178,6 @@
/* temporarily. If we find no PostScript charmap, then just use */
/* the default and hope it is the right one. */
oldcharmap = t1_face->charmap;
- charmap = NULL;
for ( n = 0; n < t1_face->num_charmaps; n++ )
{
@@ -186,9 +185,7 @@
/* check against PostScript pseudo platform */
if ( charmap->platform_id == 7 )
{
- error = FT_Set_Charmap( t1_face, charmap );
- if ( error )
- goto Exit;
+ t1_face->charmap = charmap;
break;
}
}
@@ -209,10 +206,7 @@
kp++;
}
- if ( oldcharmap )
- error = FT_Set_Charmap( t1_face, oldcharmap );
- if ( error )
- goto Exit;
+ t1_face->charmap = oldcharmap;
/* now, sort the kern pairs according to their glyph indices */
ft_qsort( fi->KernPairs, fi->NumKernPair, sizeof ( AFM_KernPairRec ),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 1b6dce84f 1/2: * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.,
Werner Lemberg <=