[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 3ef59e5: [base] Remove a check for resource ID in the
From: |
suzuki toshiya |
Subject: |
[freetype2] master 3ef59e5: [base] Remove a check for resource ID in the resource fork driver. |
Date: |
Fri, 8 Sep 2017 12:28:31 -0400 (EDT) |
branch: master
commit 3ef59e59e0d59030b1a8949a7776e14b5ae91cc6
Author: suzuki toshiya <address@hidden>
Commit: suzuki toshiya <address@hidden>
[base] Remove a check for resource ID in the resource fork driver.
LastResort.dfont has a marginal resource ID 0xFFFF for sfnt
resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs'
(1-46), tells that some IDs are reserved and should not be used.
FreeType2 just uses resource ID to sort the fragmented resource.
To accept the marginal fonts, the checking is removed.
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id
validity check, fix a trace message format.
---
ChangeLog | 13 +++++++++++++
src/base/ftrfork.c | 10 ++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3b26205..cdeb6b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2017-09-08 suzuki toshiya <address@hidden>
+ [base] Remove a check for resource ID in the resource fork driver.
+
+ LastResort.dfont has a marginal resource ID 0xFFFF for sfnt
+ resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs'
+ (1-46), tells that some IDs are reserved and should not be used.
+ FreeType2 just uses resource ID to sort the fragmented resource.
+ To accept the marginal fonts, the checking is removed.
+
+ * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id
+ validity check, fix a trace message format.
+
+2017-09-08 suzuki toshiya <address@hidden>
+
[sfnt, truetype] Register the tags for marginal fonts.
The first 32bit of standard TrueType variants is 0x00010000,
diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c
index f7b8137..f5ad287 100644
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -271,7 +271,13 @@
if ( FT_STREAM_SKIP( 4 ) ) /* mbz */
goto Exit;
- if ( ref[j].res_id < 0 || temp < 0 )
+ /*
+ * According to Inside Macintosh: More Macintosh Toolbox,
+ * "Resource IDs" (1-46), there are some reserved IDs.
+ * However, FreeType2 is not a font synthesizer, no need
+ * to check the acceptable resource ID.
+ */
+ if ( temp < 0 )
{
error = FT_THROW( Invalid_Table );
goto Exit;
@@ -281,7 +287,7 @@
FT_TRACE3(( " [%d]:"
" resource_id=0x%04x, offset=0x%08x\n",
- j, ref[j].res_id, ref[j].offset ));
+ j, (FT_UShort)ref[j].res_id, ref[j].offset ));
}
if ( sort_by_res_id )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 3ef59e5: [base] Remove a check for resource ID in the resource fork driver.,
suzuki toshiya <=