From f1c8fc3487d5c5efb8ee1804acb07e6e282d3bc5 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 26 Feb 2018 17:48:51 -0800 Subject: [PATCH] [subset] small updates to gen-unicode-ranges.py --- src/gen-unicode-ranges.py | 6 ++++-- src/hb-ot-os2-unicode-ranges.hh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gen-unicode-ranges.py b/src/gen-unicode-ranges.py index e24b262a3..3b59cd862 100644 --- a/src/gen-unicode-ranges.py +++ b/src/gen-unicode-ranges.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Generates the code for a sorted unicode range array as used in hb-ot-os2-unicode-ranges.hh -# Input is a tab seperated list of unicode ranges from the otspec. +# Input is a tab seperated list of unicode ranges from the otspec +# (https://docs.microsoft.com/en-us/typography/opentype/spec/os2#ulunicoderange1). import io import re @@ -10,7 +11,8 @@ import sys reload(sys) sys.setdefaultencoding('utf-8') -print (u"""static Range os2UnicodeRangesSorted[] = {""") +print (u"""static Range os2UnicodeRangesSorted[] = +{""") args = sys.argv[1:] input_file = args[0] diff --git a/src/hb-ot-os2-unicode-ranges.hh b/src/hb-ot-os2-unicode-ranges.hh index a3ad4d344..f4b339eaf 100644 --- a/src/hb-ot-os2-unicode-ranges.hh +++ b/src/hb-ot-os2-unicode-ranges.hh @@ -39,7 +39,8 @@ struct Range { }; /* Note: The contents of this array was generated using util/generate-unicode-ranges.py. */ -static Range os2UnicodeRangesSorted[] = { +static Range os2UnicodeRangesSorted[] = +{ { 0x0, 0x7F, 0}, // Basic Latin { 0x80, 0xFF, 1}, // Latin-1 Supplement { 0x100, 0x17F, 2}, // Latin Extended-A