~jamesmikedupont/inkscape/osm-inkscape

« back to all changes in this revision

Viewing changes to src/ui/dialog/glyphs.cpp

  • Committer: Jon A. Cruz
  • Date: 2010-04-04 17:16:55 UTC
  • Revision ID: jon@joncruz.org-20100404171655-r1gfe0yt6yyawqi3
Added control to select Unicode range limiting. Switched to using "Basic Latin" there as a default instead of the script. Fixes bug #553911.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
 
44
44
#if GLIB_CHECK_VERSION(2,14,0)
45
 
static std::map<GUnicodeScript, Glib::ustring> &getScriptToName()
 
45
static std::map<GUnicodeScript, Glib::ustring> & getScriptToName()
46
46
{
47
47
    static bool init = false;
48
48
    static std::map<GUnicodeScript, Glib::ustring> mappings;
135
135
}
136
136
#endif // GLIB_CHECK_VERSION(2,14,0)
137
137
 
 
138
typedef std::pair<gunichar, gunichar> Range;
 
139
typedef std::pair<Range, Glib::ustring> NamedRange;
 
140
 
 
141
static std::vector<NamedRange> & getRanges()
 
142
{
 
143
    static bool init = false;
 
144
    static std::vector<NamedRange> ranges;
 
145
    if (!init) {
 
146
        init = true;
 
147
        ranges.push_back(std::make_pair(std::make_pair(0x0000, 0xFFFD), _("all")));
 
148
        ranges.push_back(std::make_pair(std::make_pair(0x0000, 0x007F), _("Basic Latin")));
 
149
        ranges.push_back(std::make_pair(std::make_pair(0x0080, 0x00FF), _("Latin-1 Supplement")));
 
150
        ranges.push_back(std::make_pair(std::make_pair(0x0100, 0x017F), _("Latin Extended-A")));
 
151
        ranges.push_back(std::make_pair(std::make_pair(0x0180, 0x024F), _("Latin Extended-B")));
 
152
        ranges.push_back(std::make_pair(std::make_pair(0x0250, 0x02AF), _("IPA Extensions")));
 
153
        ranges.push_back(std::make_pair(std::make_pair(0x02B0, 0x02FF), _("Spacing Modifier Letters")));
 
154
        ranges.push_back(std::make_pair(std::make_pair(0x0300, 0x036F), _("Combining Diacritical Marks")));
 
155
        ranges.push_back(std::make_pair(std::make_pair(0x0370, 0x03FF), _("Greek and Coptic")));
 
156
        ranges.push_back(std::make_pair(std::make_pair(0x0400, 0x04FF), _("Cyrillic")));
 
157
        ranges.push_back(std::make_pair(std::make_pair(0x0500, 0x052F), _("Cyrillic Supplement")));
 
158
        ranges.push_back(std::make_pair(std::make_pair(0x0530, 0x058F), _("Armenian")));
 
159
        ranges.push_back(std::make_pair(std::make_pair(0x0590, 0x05FF), _("Hebrew")));
 
160
        ranges.push_back(std::make_pair(std::make_pair(0x0600, 0x06FF), _("Arabic")));
 
161
        ranges.push_back(std::make_pair(std::make_pair(0x0700, 0x074F), _("Syriac")));
 
162
        ranges.push_back(std::make_pair(std::make_pair(0x0750, 0x077F), _("Arabic Supplement")));
 
163
        ranges.push_back(std::make_pair(std::make_pair(0x0780, 0x07BF), _("Thaana")));
 
164
        ranges.push_back(std::make_pair(std::make_pair(0x07C0, 0x07FF), _("NKo")));
 
165
        ranges.push_back(std::make_pair(std::make_pair(0x0800, 0x083F), _("Samaritan")));
 
166
        ranges.push_back(std::make_pair(std::make_pair(0x0900, 0x097F), _("Devanagari")));
 
167
        ranges.push_back(std::make_pair(std::make_pair(0x0980, 0x09FF), _("Bengali")));
 
168
        ranges.push_back(std::make_pair(std::make_pair(0x0A00, 0x0A7F), _("Gurmukhi")));
 
169
        ranges.push_back(std::make_pair(std::make_pair(0x0A80, 0x0AFF), _("Gujarati")));
 
170
        ranges.push_back(std::make_pair(std::make_pair(0x0B00, 0x0B7F), _("Oriya")));
 
171
        ranges.push_back(std::make_pair(std::make_pair(0x0B80, 0x0BFF), _("Tamil")));
 
172
        ranges.push_back(std::make_pair(std::make_pair(0x0C00, 0x0C7F), _("Telugu")));
 
173
        ranges.push_back(std::make_pair(std::make_pair(0x0C80, 0x0CFF), _("Kannada")));
 
174
        ranges.push_back(std::make_pair(std::make_pair(0x0D00, 0x0D7F), _("Malayalam")));
 
175
        ranges.push_back(std::make_pair(std::make_pair(0x0D80, 0x0DFF), _("Sinhala")));
 
176
        ranges.push_back(std::make_pair(std::make_pair(0x0E00, 0x0E7F), _("Thai")));
 
177
        ranges.push_back(std::make_pair(std::make_pair(0x0E80, 0x0EFF), _("Lao")));
 
178
        ranges.push_back(std::make_pair(std::make_pair(0x0F00, 0x0FFF), _("Tibetan")));
 
179
        ranges.push_back(std::make_pair(std::make_pair(0x1000, 0x109F), _("Myanmar")));
 
180
        ranges.push_back(std::make_pair(std::make_pair(0x10A0, 0x10FF), _("Georgian")));
 
181
        ranges.push_back(std::make_pair(std::make_pair(0x1100, 0x11FF), _("Hangul Jamo")));
 
182
        ranges.push_back(std::make_pair(std::make_pair(0x1200, 0x137F), _("Ethiopic")));
 
183
        ranges.push_back(std::make_pair(std::make_pair(0x1380, 0x139F), _("Ethiopic Supplement")));
 
184
        ranges.push_back(std::make_pair(std::make_pair(0x13A0, 0x13FF), _("Cherokee")));
 
185
        ranges.push_back(std::make_pair(std::make_pair(0x1400, 0x167F), _("Unified Canadian Aboriginal Syllabics")));
 
186
        ranges.push_back(std::make_pair(std::make_pair(0x1680, 0x169F), _("Ogham")));
 
187
        ranges.push_back(std::make_pair(std::make_pair(0x16A0, 0x16FF), _("Runic")));
 
188
        ranges.push_back(std::make_pair(std::make_pair(0x1700, 0x171F), _("Tagalog")));
 
189
        ranges.push_back(std::make_pair(std::make_pair(0x1720, 0x173F), _("Hanunoo")));
 
190
        ranges.push_back(std::make_pair(std::make_pair(0x1740, 0x175F), _("Buhid")));
 
191
        ranges.push_back(std::make_pair(std::make_pair(0x1760, 0x177F), _("Tagbanwa")));
 
192
        ranges.push_back(std::make_pair(std::make_pair(0x1780, 0x17FF), _("Khmer")));
 
193
        ranges.push_back(std::make_pair(std::make_pair(0x1800, 0x18AF), _("Mongolian")));
 
194
        ranges.push_back(std::make_pair(std::make_pair(0x18B0, 0x18FF), _("Unified Canadian Aboriginal Syllabics Extended")));
 
195
        ranges.push_back(std::make_pair(std::make_pair(0x1900, 0x194F), _("Limbu")));
 
196
        ranges.push_back(std::make_pair(std::make_pair(0x1950, 0x197F), _("Tai Le")));
 
197
        ranges.push_back(std::make_pair(std::make_pair(0x1980, 0x19DF), _("New Tai Lue")));
 
198
        ranges.push_back(std::make_pair(std::make_pair(0x19E0, 0x19FF), _("Khmer Symbols")));
 
199
        ranges.push_back(std::make_pair(std::make_pair(0x1A00, 0x1A1F), _("Buginese")));
 
200
        ranges.push_back(std::make_pair(std::make_pair(0x1A20, 0x1AAF), _("Tai Tham")));
 
201
        ranges.push_back(std::make_pair(std::make_pair(0x1B00, 0x1B7F), _("Balinese")));
 
202
        ranges.push_back(std::make_pair(std::make_pair(0x1B80, 0x1BBF), _("Sundanese")));
 
203
        ranges.push_back(std::make_pair(std::make_pair(0x1C00, 0x1C4F), _("Lepcha")));
 
204
        ranges.push_back(std::make_pair(std::make_pair(0x1C50, 0x1C7F), _("Ol Chiki")));
 
205
        ranges.push_back(std::make_pair(std::make_pair(0x1CD0, 0x1CFF), _("Vedic Extensions")));
 
206
        ranges.push_back(std::make_pair(std::make_pair(0x1D00, 0x1D7F), _("Phonetic Extensions")));
 
207
        ranges.push_back(std::make_pair(std::make_pair(0x1D80, 0x1DBF), _("Phonetic Extensions Supplement")));
 
208
        ranges.push_back(std::make_pair(std::make_pair(0x1DC0, 0x1DFF), _("Combining Diacritical Marks Supplement")));
 
209
        ranges.push_back(std::make_pair(std::make_pair(0x1E00, 0x1EFF), _("Latin Extended Additional")));
 
210
        ranges.push_back(std::make_pair(std::make_pair(0x1F00, 0x1FFF), _("Greek Extended")));
 
211
        ranges.push_back(std::make_pair(std::make_pair(0x2000, 0x206F), _("General Punctuation")));
 
212
        ranges.push_back(std::make_pair(std::make_pair(0x2070, 0x209F), _("Superscripts and Subscripts")));
 
213
        ranges.push_back(std::make_pair(std::make_pair(0x20A0, 0x20CF), _("Currency Symbols")));
 
214
        ranges.push_back(std::make_pair(std::make_pair(0x20D0, 0x20FF), _("Combining Diacritical Marks for Symbols")));
 
215
        ranges.push_back(std::make_pair(std::make_pair(0x2100, 0x214F), _("Letterlike Symbols")));
 
216
        ranges.push_back(std::make_pair(std::make_pair(0x2150, 0x218F), _("Number Forms")));
 
217
        ranges.push_back(std::make_pair(std::make_pair(0x2190, 0x21FF), _("Arrows")));
 
218
        ranges.push_back(std::make_pair(std::make_pair(0x2200, 0x22FF), _("Mathematical Operators")));
 
219
        ranges.push_back(std::make_pair(std::make_pair(0x2300, 0x23FF), _("Miscellaneous Technical")));
 
220
        ranges.push_back(std::make_pair(std::make_pair(0x2400, 0x243F), _("Control Pictures")));
 
221
        ranges.push_back(std::make_pair(std::make_pair(0x2440, 0x245F), _("Optical Character Recognition")));
 
222
        ranges.push_back(std::make_pair(std::make_pair(0x2460, 0x24FF), _("Enclosed Alphanumerics")));
 
223
        ranges.push_back(std::make_pair(std::make_pair(0x2500, 0x257F), _("Box Drawing")));
 
224
        ranges.push_back(std::make_pair(std::make_pair(0x2580, 0x259F), _("Block Elements")));
 
225
        ranges.push_back(std::make_pair(std::make_pair(0x25A0, 0x25FF), _("Geometric Shapes")));
 
226
        ranges.push_back(std::make_pair(std::make_pair(0x2600, 0x26FF), _("Miscellaneous Symbols")));
 
227
        ranges.push_back(std::make_pair(std::make_pair(0x2700, 0x27BF), _("Dingbats")));
 
228
        ranges.push_back(std::make_pair(std::make_pair(0x27C0, 0x27EF), _("Miscellaneous Mathematical Symbols-A")));
 
229
        ranges.push_back(std::make_pair(std::make_pair(0x27F0, 0x27FF), _("Supplemental Arrows-A")));
 
230
        ranges.push_back(std::make_pair(std::make_pair(0x2800, 0x28FF), _("Braille Patterns")));
 
231
        ranges.push_back(std::make_pair(std::make_pair(0x2900, 0x297F), _("Supplemental Arrows-B")));
 
232
        ranges.push_back(std::make_pair(std::make_pair(0x2980, 0x29FF), _("Miscellaneous Mathematical Symbols-B")));
 
233
        ranges.push_back(std::make_pair(std::make_pair(0x2A00, 0x2AFF), _("Supplemental Mathematical Operators")));
 
234
        ranges.push_back(std::make_pair(std::make_pair(0x2B00, 0x2BFF), _("Miscellaneous Symbols and Arrows")));
 
235
        ranges.push_back(std::make_pair(std::make_pair(0x2C00, 0x2C5F), _("Glagolitic")));
 
236
        ranges.push_back(std::make_pair(std::make_pair(0x2C60, 0x2C7F), _("Latin Extended-C")));
 
237
        ranges.push_back(std::make_pair(std::make_pair(0x2C80, 0x2CFF), _("Coptic")));
 
238
        ranges.push_back(std::make_pair(std::make_pair(0x2D00, 0x2D2F), _("Georgian Supplement")));
 
239
        ranges.push_back(std::make_pair(std::make_pair(0x2D30, 0x2D7F), _("Tifinagh")));
 
240
        ranges.push_back(std::make_pair(std::make_pair(0x2D80, 0x2DDF), _("Ethiopic Extended")));
 
241
        ranges.push_back(std::make_pair(std::make_pair(0x2DE0, 0x2DFF), _("Cyrillic Extended-A")));
 
242
        ranges.push_back(std::make_pair(std::make_pair(0x2E00, 0x2E7F), _("Supplemental Punctuation")));
 
243
        ranges.push_back(std::make_pair(std::make_pair(0x2E80, 0x2EFF), _("CJK Radicals Supplement")));
 
244
        ranges.push_back(std::make_pair(std::make_pair(0x2F00, 0x2FDF), _("Kangxi Radicals")));
 
245
        ranges.push_back(std::make_pair(std::make_pair(0x2FF0, 0x2FFF), _("Ideographic Description Characters")));
 
246
        ranges.push_back(std::make_pair(std::make_pair(0x3000, 0x303F), _("CJK Symbols and Punctuation")));
 
247
        ranges.push_back(std::make_pair(std::make_pair(0x3040, 0x309F), _("Hiragana")));
 
248
        ranges.push_back(std::make_pair(std::make_pair(0x30A0, 0x30FF), _("Katakana")));
 
249
        ranges.push_back(std::make_pair(std::make_pair(0x3100, 0x312F), _("Bopomofo")));
 
250
        ranges.push_back(std::make_pair(std::make_pair(0x3130, 0x318F), _("Hangul Compatibility Jamo")));
 
251
        ranges.push_back(std::make_pair(std::make_pair(0x3190, 0x319F), _("Kanbun")));
 
252
        ranges.push_back(std::make_pair(std::make_pair(0x31A0, 0x31BF), _("Bopomofo Extended")));
 
253
        ranges.push_back(std::make_pair(std::make_pair(0x31C0, 0x31EF), _("CJK Strokes")));
 
254
        ranges.push_back(std::make_pair(std::make_pair(0x31F0, 0x31FF), _("Katakana Phonetic Extensions")));
 
255
        ranges.push_back(std::make_pair(std::make_pair(0x3200, 0x32FF), _("Enclosed CJK Letters and Months")));
 
256
        ranges.push_back(std::make_pair(std::make_pair(0x3300, 0x33FF), _("CJK Compatibility")));
 
257
        ranges.push_back(std::make_pair(std::make_pair(0x3400, 0x4DBF), _("CJK Unified Ideographs Extension A")));
 
258
        ranges.push_back(std::make_pair(std::make_pair(0x4DC0, 0x4DFF), _("Yijing Hexagram Symbols")));
 
259
        ranges.push_back(std::make_pair(std::make_pair(0x4E00, 0x9FFF), _("CJK Unified Ideographs")));
 
260
        ranges.push_back(std::make_pair(std::make_pair(0xA000, 0xA48F), _("Yi Syllables")));
 
261
        ranges.push_back(std::make_pair(std::make_pair(0xA490, 0xA4CF), _("Yi Radicals")));
 
262
        ranges.push_back(std::make_pair(std::make_pair(0xA4D0, 0xA4FF), _("Lisu")));
 
263
        ranges.push_back(std::make_pair(std::make_pair(0xA500, 0xA63F), _("Vai")));
 
264
        ranges.push_back(std::make_pair(std::make_pair(0xA640, 0xA69F), _("Cyrillic Extended-B")));
 
265
        ranges.push_back(std::make_pair(std::make_pair(0xA6A0, 0xA6FF), _("Bamum")));
 
266
        ranges.push_back(std::make_pair(std::make_pair(0xA700, 0xA71F), _("Modifier Tone Letters")));
 
267
        ranges.push_back(std::make_pair(std::make_pair(0xA720, 0xA7FF), _("Latin Extended-D")));
 
268
        ranges.push_back(std::make_pair(std::make_pair(0xA800, 0xA82F), _("Syloti Nagri")));
 
269
        ranges.push_back(std::make_pair(std::make_pair(0xA830, 0xA83F), _("Common Indic Number Forms")));
 
270
        ranges.push_back(std::make_pair(std::make_pair(0xA840, 0xA87F), _("Phags-pa")));
 
271
        ranges.push_back(std::make_pair(std::make_pair(0xA880, 0xA8DF), _("Saurashtra")));
 
272
        ranges.push_back(std::make_pair(std::make_pair(0xA8E0, 0xA8FF), _("Devanagari Extended")));
 
273
        ranges.push_back(std::make_pair(std::make_pair(0xA900, 0xA92F), _("Kayah Li")));
 
274
        ranges.push_back(std::make_pair(std::make_pair(0xA930, 0xA95F), _("Rejang")));
 
275
        ranges.push_back(std::make_pair(std::make_pair(0xA960, 0xA97F), _("Hangul Jamo Extended-A")));
 
276
        ranges.push_back(std::make_pair(std::make_pair(0xA980, 0xA9DF), _("Javanese")));
 
277
        ranges.push_back(std::make_pair(std::make_pair(0xAA00, 0xAA5F), _("Cham")));
 
278
        ranges.push_back(std::make_pair(std::make_pair(0xAA60, 0xAA7F), _("Myanmar Extended-A")));
 
279
        ranges.push_back(std::make_pair(std::make_pair(0xAA80, 0xAADF), _("Tai Viet")));
 
280
        ranges.push_back(std::make_pair(std::make_pair(0xABC0, 0xABFF), _("Meetei Mayek")));
 
281
        ranges.push_back(std::make_pair(std::make_pair(0xAC00, 0xD7AF), _("Hangul Syllables")));
 
282
        ranges.push_back(std::make_pair(std::make_pair(0xD7B0, 0xD7FF), _("Hangul Jamo Extended-B")));
 
283
        ranges.push_back(std::make_pair(std::make_pair(0xD800, 0xDB7F), _("High Surrogates")));
 
284
        ranges.push_back(std::make_pair(std::make_pair(0xDB80, 0xDBFF), _("High Private Use Surrogates")));
 
285
        ranges.push_back(std::make_pair(std::make_pair(0xDC00, 0xDFFF), _("Low Surrogates")));
 
286
        ranges.push_back(std::make_pair(std::make_pair(0xE000, 0xF8FF), _("Private Use Area")));
 
287
        ranges.push_back(std::make_pair(std::make_pair(0xF900, 0xFAFF), _("CJK Compatibility Ideographs")));
 
288
        ranges.push_back(std::make_pair(std::make_pair(0xFB00, 0xFB4F), _("Alphabetic Presentation Forms")));
 
289
        ranges.push_back(std::make_pair(std::make_pair(0xFB50, 0xFDFF), _("Arabic Presentation Forms-A")));
 
290
        ranges.push_back(std::make_pair(std::make_pair(0xFE00, 0xFE0F), _("Variation Selectors")));
 
291
        ranges.push_back(std::make_pair(std::make_pair(0xFE10, 0xFE1F), _("Vertical Forms")));
 
292
        ranges.push_back(std::make_pair(std::make_pair(0xFE20, 0xFE2F), _("Combining Half Marks")));
 
293
        ranges.push_back(std::make_pair(std::make_pair(0xFE30, 0xFE4F), _("CJK Compatibility Forms")));
 
294
        ranges.push_back(std::make_pair(std::make_pair(0xFE50, 0xFE6F), _("Small Form Variants")));
 
295
        ranges.push_back(std::make_pair(std::make_pair(0xFE70, 0xFEFF), _("Arabic Presentation Forms-B")));
 
296
        ranges.push_back(std::make_pair(std::make_pair(0xFF00, 0xFFEF), _("Halfwidth and Fullwidth Forms")));
 
297
        ranges.push_back(std::make_pair(std::make_pair(0xFFF0, 0xFFFF), _("Specials")));
 
298
    }
 
299
 
 
300
    return ranges;
 
301
}
138
302
 
139
303
class GlyphColumns : public Gtk::TreeModel::ColumnRecord
140
304
{
173
337
    deskTrack(),
174
338
    iconActiveConn(),
175
339
    iconSelectConn(),
176
 
    scriptSelectConn()
 
340
    scriptSelectConn(),
 
341
    rangeSelectConn()
177
342
{
178
343
    Gtk::Table *table = new Gtk::Table(3, 1, false);
179
344
    _getContents()->pack_start(*Gtk::manage(table), Gtk::PACK_EXPAND_WIDGET);
203
368
                       Gtk::SHRINK, Gtk::SHRINK);
204
369
 
205
370
        scriptCombo = new Gtk::ComboBoxText();
206
 
 
207
 
        std::map<GUnicodeScript, Glib::ustring> items = getScriptToName();
208
 
        for (std::map<GUnicodeScript, Glib::ustring>::iterator it = items.begin(); it != items.end(); ++it)
 
371
        for (std::map<GUnicodeScript, Glib::ustring>::iterator it = getScriptToName().begin(); it != getScriptToName().end(); ++it)
209
372
        {
210
373
            scriptCombo->append_text(it->second);
211
374
        }
212
375
 
213
 
        scriptCombo->set_active_text(getScriptToName()[G_UNICODE_SCRIPT_COMMON]); // default to a smaller set
 
376
        scriptCombo->set_active_text(getScriptToName()[G_UNICODE_SCRIPT_INVALID_CODE]);
214
377
        scriptSelectConn = scriptCombo->signal_changed().connect(sigc::mem_fun(*this, &GlyphsPanel::rebuild));
215
378
 
216
 
        table->attach( *Gtk::manage(scriptCombo),
 
379
        Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_TOP, 0.0, 0.0);
 
380
        align->add(*Gtk::manage(scriptCombo));
 
381
        table->attach( *Gtk::manage(align),
217
382
                       1, 2, row, row + 1,
 
383
                       Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK);
 
384
    }
 
385
 
 
386
    row++;
 
387
#endif // GLIB_CHECK_VERSION(2,14,0)
 
388
 
 
389
// -------------------------------
 
390
 
 
391
    {
 
392
        Gtk::Label *label = new Gtk::Label(_("Range: "));
 
393
        table->attach( *Gtk::manage(label),
 
394
                       0, 1, row, row + 1,
218
395
                       Gtk::SHRINK, Gtk::SHRINK);
219
396
 
220
 
        label = new Gtk::Label("");
221
 
        table->attach( *Gtk::manage(label),
222
 
                       2, 3, row, row + 1,
223
 
                       Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
 
397
        rangeCombo = new Gtk::ComboBoxText();
 
398
        for ( std::vector<NamedRange>::iterator it = getRanges().begin(); it != getRanges().end(); ++it ) {
 
399
            rangeCombo->append_text(it->second);
 
400
        }
 
401
 
 
402
        rangeCombo->set_active_text(getRanges()[1].second);
 
403
        rangeSelectConn = rangeCombo->signal_changed().connect(sigc::mem_fun(*this, &GlyphsPanel::rebuild));
 
404
 
 
405
        Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_TOP, 0.0, 0.0);
 
406
        align->add(*Gtk::manage(rangeCombo));
 
407
        table->attach( *Gtk::manage(align),
 
408
                       1, 2, row, row + 1,
 
409
                       Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK);
224
410
    }
225
411
 
226
412
    row++;
227
 
#endif // GLIB_CHECK_VERSION(2,14,0)
228
413
 
229
414
// -------------------------------
230
415
 
291
476
{
292
477
    iconActiveConn.disconnect();
293
478
    iconSelectConn.disconnect();
 
479
    rangeSelectConn.disconnect();
294
480
    scriptSelectConn.disconnect();
295
481
    desktopChangeConn.disconnect();
296
482
}
366
552
        //double  sp_font_selector_get_size (SPFontSelector *fsel);
367
553
 
368
554
#if GLIB_CHECK_VERSION(2,14,0)
369
 
        GUnicodeScript script = G_UNICODE_SCRIPT_COMMON;
 
555
        GUnicodeScript script = G_UNICODE_SCRIPT_INVALID_CODE;
370
556
        Glib::ustring scriptName = scriptCombo->get_active_text();
371
557
        std::map<GUnicodeScript, Glib::ustring> items = getScriptToName();
372
558
        for (std::map<GUnicodeScript, Glib::ustring>::iterator it = items.begin(); it != items.end(); ++it) {
381
567
        Glib::RefPtr<Gtk::ListStore> tmp = Gtk::ListStore::create(*getColumns());
382
568
        iconView->set_model(tmp);
383
569
 
 
570
        gunichar lower = 0x0001;
 
571
        gunichar upper = 0xFFFD;
 
572
        int active = rangeCombo->get_active_row_number();
 
573
        if (active >= 0) {
 
574
            lower = getRanges()[active].first.first;
 
575
            upper = getRanges()[active].first.second;
 
576
        }
384
577
        std::vector<gunichar> present;
385
 
        for (gunichar ch = 1; ch < 65535; ch++) {
 
578
        for (gunichar ch = lower; ch <= upper; ch++) {
386
579
            int glyphId = font->MapUnicodeChar(ch);
387
580
            if (glyphId > 0) {
388
581
#if GLIB_CHECK_VERSION(2,14,0)