From: Mikko Rasa Date: Sat, 14 Apr 2018 14:17:30 +0000 (+0300) Subject: Add a default code point range if none were specified X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d7364c7589542039d662589f654518ff628217db;p=ttf2png.git Add a default code point range if none were specified --- diff --git a/ttf2png.c b/ttf2png.c index 6224fc3..236fe9e 100644 --- a/ttf2png.c +++ b/ttf2png.c @@ -215,8 +215,17 @@ int main(int argc, char **argv) return 1; } + if(!n_ranges) + { + ranges = malloc(sizeof(Range)); + ranges[0].first = 0; + ranges[0].last = 255; + n_ranges = 1; + } + else + sort_and_compact_ranges(ranges, &n_ranges); + font.size = size; - sort_and_compact_ranges(ranges, &n_ranges); err = init_font(&font, face, ranges, n_ranges, autohinter); if(err) return 1;