From fd911059106bb025c621b9f84437dc3fe65d7067 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 14 Jun 2018 13:32:20 +0200 Subject: Create at least two radio buttons for a table. Calculation of number of radio buttons to create could be "wrong" due to script and language tags of tables. --- src/ui/widget/font-variants.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index 144df39c3..4b46c4bb9 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -1080,6 +1080,13 @@ namespace Widget { // Our lame attempt at determining number of alternative glyphs for one glyph: int number = table.second.output.length() / table.second.input.length(); + if (number < 1) { + number = 1; // Must have at least on/off, see comment above about 'lang' attribute. + // std::cout << table.first << " " + // << table.second.output.length() << "/" + // << table.second.input.length() << "=" + // << number << std::endl; + } _features[table.first] = new Feature (table.first, table.second, number+1, sp_font_description_get_family(res->descr), -- cgit v1.2.3