[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master e77d8ba87: * src/cff/cffcmap.c (cff_cmap_encoding_cha
From: |
Werner Lemberg |
Subject: |
[freetype2] master e77d8ba87: * src/cff/cffcmap.c (cff_cmap_encoding_char_next): Abbreviate. |
Date: |
Mon, 10 Apr 2023 15:19:41 -0400 (EDT) |
branch: master
commit e77d8ba87cf24c4bd07c5c4f23b17e5e4d4f433b
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cff/cffcmap.c (cff_cmap_encoding_char_next): Abbreviate.
---
src/cff/cffcmap.c | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index 4988d7955..94077c596 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -77,28 +77,16 @@
FT_UInt32 char_code = *pchar_code;
- *pchar_code = 0;
-
- if ( char_code < 255 )
+ while ( char_code < 255 )
{
- FT_UInt code = (FT_UInt)( char_code + 1 );
-
-
- for (;;)
+ result = cmap->gids[++char_code];
+ if ( result )
{
- if ( code >= 256 )
- break;
-
- result = cmap->gids[code];
- if ( result != 0 )
- {
- *pchar_code = code;
- break;
- }
-
- code++;
+ *pchar_code = char_code;
+ break;
}
}
+
return result;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master e77d8ba87: * src/cff/cffcmap.c (cff_cmap_encoding_char_next): Abbreviate.,
Werner Lemberg <=