From b26271cc4dcc5256a2181d8307dde9a2b3cd45d5 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Tue, 28 Jan 2025 19:03:43 -0500 Subject: [PATCH] [unicodedata] Fix bug in buildUCD.py The method that was being used to read the header from the input was inadvertently dropping the first non-header line on the floor; although this happens to be okay in some cases (where there is an empty line after the header) in the case of newer versions of the ScriptExtensions.txt file, this was causing the generated code to be missing the first entry, for U+00B7 (MIDDLE DOT) --- Lib/fontTools/unicodedata/Blocks.py | 1 - Lib/fontTools/unicodedata/ScriptExtensions.py | 26 ++++++++-- Lib/fontTools/unicodedata/Scripts.py | 1 - MetaTools/buildUCD.py | 47 +++++++++---------- Tests/unicodedata_test.py | 27 +++++++++++ 5 files changed, 73 insertions(+), 29 deletions(-) diff --git a/Lib/fontTools/unicodedata/Blocks.py b/Lib/fontTools/unicodedata/Blocks.py index 7084d911d..c0e771842 100644 --- a/Lib/fontTools/unicodedata/Blocks.py +++ b/Lib/fontTools/unicodedata/Blocks.py @@ -16,7 +16,6 @@ # Format: # Start Code..End Code; Block Name - RANGES = [ 0x0000, # .. 0x007F ; Basic Latin 0x0080, # .. 0x00FF ; Latin-1 Supplement diff --git a/Lib/fontTools/unicodedata/ScriptExtensions.py b/Lib/fontTools/unicodedata/ScriptExtensions.py index df7be88f0..d6fe68fd2 100644 --- a/Lib/fontTools/unicodedata/ScriptExtensions.py +++ b/Lib/fontTools/unicodedata/ScriptExtensions.py @@ -32,9 +32,10 @@ # # @missing: 0000..10FFFF;