Commit 11e7639d authored by bzt's avatar bzt

Added SSFN_CONSOLEBITMAP_CLEARBG to simple renderer

parent 638f3985
......@@ -97,6 +97,15 @@ Do not include the normal renderer implementation, only the file format defines
Only one of these can be specified at once. These include the simple renderer which is totally independent
from the rest of the API. It is a very specialized renderer, limited and optimized for OS kernel consoles.
It renderers directly to the framebuffer, and you specify the framebuffer's pixel format with one of these.
```c
#define SSFN_CONSOLEBITMAP_CLEARBG
```
Normally the simple renderer displays only font face, leaving the background untouched. With this define
you can tell it to cover the back of the glyph with a given color, hence overlapping console messages
won't mess up the screen.
Variable Types
--------------
......@@ -439,7 +448,7 @@ Configuration is passed to it in global variables (exclusive to this function, t
| `uint32_t ssfn_dst_w` | the desitnation buffer's width in pixels (optional) |
| `uint32_t ssfn_dst_h` | the desitnation buffer's height in pixels (optional) |
| `uint32_t ssfn_fg` | the foreground color in destination buffer's native format |
| `uint32_t ssfn_bg` | the background color |
| `uint32_t ssfn_bg` | the background color (only used with `SSFN_CONSOLEBITMAP_CLEARBG`) |
| `uint32_t ssfn_x` | the coordinate to draw to, will be modified by glyph's advance values |
| `uint32_t ssfn_y` | the coordinate to draw to |
| `uint32_t ssfn_adv_x` | the glyph's advance value, returned after rendering |
......@@ -449,6 +458,9 @@ The define selects the destination buffer's pixel format. `SSFN_CONSOLEBITMAP_PA
(indexed), `SSFN_CONSOLEBITMAP_HICOLOR` selects 2 bytes (5-5-5 or 5-6-5 RGB) and `SSFN_CONSOLEBITMAP_TRUECOLOR`
selects 4 bytes (8-8-8-8 xRGB). For performance reasons, 3 bytes (24 bit true color) mode is not supported.
The `SSFN_CONSOLEBITMAP_CLEARBG` can be added to any of the above defines. That will turn transparency off, and
will fill the glyph's background with `ssfn_bg`.
### Return value
Either `SSFN_OK`, `SSFN_ERR_NOGLYPH` or `SSFN_ERR_INVINP` (when the character would be displayed out of screen). On
......
......@@ -138,44 +138,44 @@ generate reports like this:
$ ./sfn2asc -r u_vga16.sfn
```
| Coverage | #Glyph | Start | End | Description |
| -------: | -----: | ------ | ------ | ------------------------------------------ |
| 75.7% | 97 | 000000 | 00007F | Basic Latin |
| 75.0% | 96 | 000080 | 0000FF | Latin-1 Supplement |
| 100.0% | 128 | 000100 | 00017F | Latin Extended-A |
| 85.5% | 178 | 000180 | 00024F | Latin Extended-B |
| 97.9% | 94 | 000250 | 0002AF | IPA Extensions |
| 48.7% | 39 | 0002B0 | 0002FF | Spacing Modifier Letters |
| 8.9% | 10 | 000300 | 00036F | Combining Diacritical Marks |
| 81.4% | 110 | 000370 | 0003FF | Greek and Coptic |
| 96.0% | 246 | 000400 | 0004FF | Cyrillic |
| 33.3% | 16 | 000500 | 00052F | Cyrillic Supplement |
| 95.6% | 87 | 000530 | 00058F | Armenian |
| 93.1% | 82 | 000590 | 0005FF | Hebrew |
| 80.7% | 206 | 000600 | 0006FF | Arabic |
| 5.6% | 5 | 0010A0 | 0010FF | Georgian |
| 96.0% | 246 | 001E00 | 001EFF | Latin Extended Additional |
| 3.4% | 8 | 001F00 | 001FFF | Greek Extended |
| 62.1% | 69 | 002000 | 00206F | General Punctuation |
| 69.0% | 29 | 002070 | 00209F | Superscripts and Subscripts |
| 50.0% | 16 | 0020A0 | 0020CF | Currency Symbols |
| 73.7% | 59 | 002100 | 00214F | Letterlike Symbols |
| 81.6% | 49 | 002150 | 00218F | Number Forms |
| 89.2% | 100 | 002190 | 0021FF | Arrows |
| 94.5% | 242 | 002200 | 0022FF | Mathematical Operators |
| 19.5% | 50 | 002300 | 0023FF | Miscellaneous Technical |
| 20.5% | 8 | 002400 | 00243F | Control Pictures |
| 100.0% | 128 | 002500 | 00257F | Box Drawing |
| 68.7% | 22 | 002580 | 00259F | Block Elements |
| 91.6% | 88 | 0025A0 | 0025FF | Geometric Shapes |
| 29.2% | 75 | 002600 | 0026FF | Miscellaneous Symbols |
| 10.3% | 6 | 00FB00 | 00FB4F | Alphabetic Presentation Forms |
| 23.4% | 143 | 00FB50 | 00FDFF | Arabic Presentation Forms-A |
| 100.0% | 26 | 00FE50 | 00FE6F | Small Form Variants |
| 99.2% | 140 | 00FE70 | 00FEFF | Arabic Presentation Forms-B |
| 20.0% | 1 | 00FFF0 | 00FFFF | Specials |
| -------- | ------ | ------------------------------------------------------------ |
| 62.0% | 2899 | = = = = = = = = Overall Coverage = = = = = = = = |
| Coverage | NumChar | Start | End | Description |
| -------: | ------: | ------ | ------ | ------------------------------------------ |
| 75.7% | 97 | 000000 | 00007F | Basic Latin |
| 75.0% | 96 | 000080 | 0000FF | Latin-1 Supplement |
| 100.0% | 128 | 000100 | 00017F | Latin Extended-A |
| 85.5% | 178 | 000180 | 00024F | Latin Extended-B |
| 97.9% | 94 | 000250 | 0002AF | IPA Extensions |
| 48.7% | 39 | 0002B0 | 0002FF | Spacing Modifier Letters |
| 8.9% | 10 | 000300 | 00036F | Combining Diacritical Marks |
| 81.4% | 110 | 000370 | 0003FF | Greek and Coptic |
| 96.0% | 246 | 000400 | 0004FF | Cyrillic |
| 33.3% | 16 | 000500 | 00052F | Cyrillic Supplement |
| 95.6% | 87 | 000530 | 00058F | Armenian |
| 93.1% | 82 | 000590 | 0005FF | Hebrew |
| 80.7% | 206 | 000600 | 0006FF | Arabic |
| 5.6% | 5 | 0010A0 | 0010FF | Georgian |
| 96.0% | 246 | 001E00 | 001EFF | Latin Extended Additional |
| 3.4% | 8 | 001F00 | 001FFF | Greek Extended |
| 62.1% | 69 | 002000 | 00206F | General Punctuation |
| 69.0% | 29 | 002070 | 00209F | Superscripts and Subscripts |
| 50.0% | 16 | 0020A0 | 0020CF | Currency Symbols |
| 73.7% | 59 | 002100 | 00214F | Letterlike Symbols |
| 81.6% | 49 | 002150 | 00218F | Number Forms |
| 89.2% | 100 | 002190 | 0021FF | Arrows |
| 94.5% | 242 | 002200 | 0022FF | Mathematical Operators |
| 19.5% | 50 | 002300 | 0023FF | Miscellaneous Technical |
| 20.5% | 8 | 002400 | 00243F | Control Pictures |
| 100.0% | 128 | 002500 | 00257F | Box Drawing |
| 68.7% | 22 | 002580 | 00259F | Block Elements |
| 91.6% | 88 | 0025A0 | 0025FF | Geometric Shapes |
| 29.2% | 75 | 002600 | 0026FF | Miscellaneous Symbols |
| 10.3% | 6 | 00FB00 | 00FB4F | Alphabetic Presentation Forms |
| 23.4% | 143 | 00FB50 | 00FDFF | Arabic Presentation Forms-A |
| 100.0% | 26 | 00FE50 | 00FE6F | Small Form Variants |
| 99.2% | 140 | 00FE70 | 00FEFF | Arabic Presentation Forms-B |
| 20.0% | 1 | 00FFF0 | 00FFFF | Specials |
| -------- | ------- | ------------------------------------------------------------ |
| 62.0% | 2899 | = = = = = = = = Overall Coverage = = = = = = = = |
Checking SSFN Font Integrity and Validity
-----------------------------------------
......
......@@ -3,6 +3,10 @@ ifneq ("$(wildcard /usr/include/zlib.h)","")
CFLAGS += -DHAS_ZLIB=1
LIBS = -lz
endif
ifneq ("$(wildcard ../sfnedit/unicode.h)","")
CFLAGS += -DHAS_UNICODE=1
LIBS = -lz
endif
all: ttf2sfn bit2sfn sfn2asc
......
/*
* ttf2sfn.c
* bit2sfn.c
*
* Copyright (C) 2019 bzt (bztsrc@gitlab)
*
......@@ -23,7 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* @brief TrueType and OpenType to Scalable Screen Font converter
* @brief bitmap and pixmap fonts to Scalable Screen Font converter
*
* Note: this tools handles memory allocation in a lazy fashion, but
* that's okay as it's a command line tool which exists immediately
......@@ -34,12 +34,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ublocks.h"
#define SSFN_NOIMPLEMENTATION
#include "../ssfn.h"
/* psfu and bdf files are often gzipped */
#if HAS_ZLIB
#include <zlib.h>
# include <zlib.h>
#endif
#if HAS_UNICODE
# define _UNICODE_BLOCKSDATA
# include "../sfnedit/unicode.h"
#endif
#define iswhitespace(x) ((x)==0x20||(x)==0xA0)
......@@ -1247,7 +1250,7 @@ void asc(char *ptr, int size)
void usage()
{
printf("Scalable Screen Font by bzt Copyright (C) 2019 MIT license\n\n"
"bit2sfn [-0|-1|-2|-3|-4|-5|-6] [-R] [-g] "
"./bit2sfn [-0|-1|-2|-3|-4|-5|-6] [-R] [-g] "
#if HAS_ZLIB
"[-z] "
#endif
......@@ -1325,6 +1328,7 @@ int main(int argc, char **argv)
if((argv[i][0] >= '0' && argv[i][0] <= '9') || (argv[i][0]=='U' && argv[i][1]=='+') || argv[i][0]=='\'') {
if(i+1>=argc) usage();
rs = getnum(argv[i++]); re = getnum(argv[i]);
#if HAS_UNICODE
} else {
for(rs=re=j=0;j<(int)(sizeof(ublocks)/sizeof(ublocks[0]));j++)
if(!unicmp(argv[i], ublocks[j].name)) {
......@@ -1341,10 +1345,15 @@ int main(int argc, char **argv)
}
if(!re)
for(j=0;j<(int)(sizeof(ublocks)/sizeof(ublocks[0]));j++)
if(tolower(argv[i][0]) == tolower(ublocks[j].name[0]))
if(tolower(argv[i][0]) == tolower(ublocks[j].name[0])) {
fprintf(stderr, " %s\n", ublocks[j].name);
re++;
}
if(!re)
printf(" no matching blocks found\n");
return 1;
}
#endif
}
if(rs > 0x10FFFF || re > 0x10FFFF || rs > re) {
fprintf(stderr, "unable to get range '%s' '%s'\n", argv[i], argv[i]+1);
......
......@@ -34,11 +34,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ublocks.h"
#define SSFN_NOIMPLEMENTATION
#include "../ssfn.h"
#if HAS_ZLIB
#include <zlib.h>
# include <zlib.h>
#endif
#if HAS_UNICODE
# define _UNICODE_BLOCKSDATA
# include "../sfnedit/unicode.h"
#endif
/*** variables ***/
......@@ -835,6 +838,9 @@ int main(int argc, char **argv)
}
if(range) {
printf("| Coverage | NumChar | Start | End | Description |\n"
"| -------: | ------: | ------ | ------ | ------------------------------------------ |\n");
#if HAS_UNICODE
ptr = (unsigned char *)font + font->characters_offs;
if(font->quality < 5 && font->characters_offs < 65536) l = 4; else
if(font->characters_offs < 1048576) l = 5; else l = 6;
......@@ -850,23 +856,26 @@ int main(int argc, char **argv)
j++;
}
}
printf("| Coverage | #Glyph | Start | End | Description |\n"
"| -------: | -----: | ------ | ------ | ------------------------------------------ |\n");
for(a=b=k=0;k<(int)(sizeof(ublocks)/sizeof(ublocks[0]));k++) {
if(ublocks[k].cnt) {
n = ublocks[k].end - ublocks[k].start + 1 - ublocks[k].undef;
if(ublocks[k].cnt > n) { m += ublocks[k].cnt - n; ublocks[k].cnt = n; };
a += ublocks[k].cnt; b += n;
d = ublocks[k].cnt * 1000 / n;
printf("| %3d.%d%% | %6d | %06X | %06X | %-42s |\n", d/10, d%10,
printf("| %3d.%d%% | %7d | %06X | %06X | %-42s |\n", d/10, d%10,
ublocks[k].cnt, ublocks[k].start, ublocks[k].end, ublocks[k].name);
}
}
if(m)
printf("| - | %6d | 000000 | 10FFFF | No Block |\n", m);
printf("| - | %7d | 000000 | 10FFFF | No Block |\n", m);
d = a * 1000 / b;
printf("| -------- | ------ | ------------------------------------------------------------ |\n"
"| %3d.%d%% | %6d | = = = = = = = = Overall Coverage = = = = = = = = |\n", d/10, d%10, a);
printf("| -------- | ------- | ------------------------------------------------------------ |\n"
"| %3d.%d%% | %7d | = = = = = = = = Overall Coverage = = = = = = = = |\n", d/10, d%10, a);
#else
d = font->characters_num * 1000 / 0x110000;
printf("| %3d.%d%% | %7d | %06X | %06X | %-42s |\n", d/10, d%10,
0x110000, 0, 0x10FFFF, "No UNICODE blocks data, overall coverage");
#endif
return 0;
}
if(!outfile) { fprintf(stderr,"no output file specified\n"); free(font); return 3; }
......
/*
* ublocks.h
*
* --- Generated from Blocks.txt and UnicodeData.txt by ublocks.php ---
*
* Copyright (C) 2019 bzt (bztsrc@gitlab)
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* @brief UNICODE blocks
*
*/
/*** UNICODE blocks ***/
typedef struct {
int cnt;
int undef;
int start;
int end;
char *name;
} unicode_block_t;
unicode_block_t ublocks[] = {
{ 0, 0, 0x000000, 0x00007f, "Basic Latin" },
{ 0, 0, 0x000080, 0x0000ff, "Latin-1 Supplement" },
{ 0, 0, 0x000100, 0x00017f, "Latin Extended-A" },
{ 0, 0, 0x000180, 0x00024f, "Latin Extended-B" },
{ 0, 0, 0x000250, 0x0002af, "IPA Extensions" },
{ 0, 0, 0x0002b0, 0x0002ff, "Spacing Modifier Letters" },
{ 0, 0, 0x000300, 0x00036f, "Combining Diacritical Marks" },
{ 0, 9, 0x000370, 0x0003ff, "Greek and Coptic" },
{ 0, 0, 0x000400, 0x0004ff, "Cyrillic" },
{ 0, 0, 0x000500, 0x00052f, "Cyrillic Supplement" },
{ 0, 5, 0x000530, 0x00058f, "Armenian" },
{ 0,24, 0x000590, 0x0005ff, "Hebrew" },
{ 0, 1, 0x000600, 0x0006ff, "Arabic" },
{ 0, 3, 0x000700, 0x00074f, "Syriac" },
{ 0, 0, 0x000750, 0x00077f, "Arabic Supplement" },
{ 0,14, 0x000780, 0x0007bf, "Thaana" },
{ 0, 2, 0x0007c0, 0x0007ff, "NKo" },
{ 0, 3, 0x000800, 0x00083f, "Samaritan" },
{ 0, 3, 0x000840, 0x00085f, "Mandaic" },
{ 0, 5, 0x000860, 0x00086f, "Syriac Supplement" },
{ 0,22, 0x0008a0, 0x0008ff, "Arabic Extended-A" },
{ 0, 0, 0x000900, 0x00097f, "Devanagari" },
{ 0,32, 0x000980, 0x0009ff, "Bengali" },
{ 0,48, 0x000a00, 0x000a7f, "Gurmukhi" },
{ 0,37, 0x000a80, 0x000aff, "Gujarati" },
{ 0,38, 0x000b00, 0x000b7f, "Oriya" },
{ 0,56, 0x000b80, 0x000bff, "Tamil" },
{ 0,30, 0x000c00, 0x000c7f, "Telugu" },
{ 0,39, 0x000c80, 0x000cff, "Kannada" },
{ 0,11, 0x000d00, 0x000d7f, "Malayalam" },
{ 0,38, 0x000d80, 0x000dff, "Sinhala" },
{ 0,41, 0x000e00, 0x000e7f, "Thai" },
{ 0,46, 0x000e80, 0x000eff, "Lao" },
{ 0,45, 0x000f00, 0x000fff, "Tibetan" },
{ 0, 0, 0x001000, 0x00109f, "Myanmar" },
{ 0, 8, 0x0010a0, 0x0010ff, "Georgian" },
{ 0, 0, 0x001100, 0x0011ff, "Hangul Jamo" },
{ 0,26, 0x001200, 0x00137f, "Ethiopic" },
{ 0, 6, 0x001380, 0x00139f, "Ethiopic Supplement" },
{ 0, 4, 0x0013a0, 0x0013ff, "Cherokee" },
{ 0, 0, 0x001400, 0x00167f, "Unified Canadian Aboriginal Syllabics" },
{ 0, 3, 0x001680, 0x00169f, "Ogham" },
{ 0, 7, 0x0016a0, 0x0016ff, "Runic" },
{ 0,12, 0x001700, 0x00171f, "Tagalog" },
{ 0, 9, 0x001720, 0x00173f, "Hanunoo" },
{ 0,12, 0x001740, 0x00175f, "Buhid" },
{ 0,14, 0x001760, 0x00177f, "Tagbanwa" },
{ 0,14, 0x001780, 0x0017ff, "Khmer" },
{ 0,19, 0x001800, 0x0018af, "Mongolian" },
{ 0,10, 0x0018b0, 0x0018ff, "Unified Canadian Aboriginal Syllabics Extended" },
{ 0,12, 0x001900, 0x00194f, "Limbu" },
{ 0,13, 0x001950, 0x00197f, "Tai Le" },
{ 0,13, 0x001980, 0x0019df, "New Tai Lue" },
{ 0, 0, 0x0019e0, 0x0019ff, "Khmer Symbols" },
{ 0, 2, 0x001a00, 0x001a1f, "Buginese" },
{ 0,17, 0x001a20, 0x001aaf, "Tai Tham" },
{ 0,65, 0x001ab0, 0x001aff, "Combining Diacritical Marks Extended" },
{ 0, 7, 0x001b00, 0x001b7f, "Balinese" },
{ 0, 0, 0x001b80, 0x001bbf, "Sundanese" },
{ 0, 8, 0x001bc0, 0x001bff, "Batak" },
{ 0, 6, 0x001c00, 0x001c4f, "Lepcha" },
{ 0, 0, 0x001c50, 0x001c7f, "Ol Chiki" },
{ 0, 7, 0x001c80, 0x001c8f, "Cyrillic Extended-C" },
{ 0, 2, 0x001c90, 0x001cbf, "Georgian Extended" },
{ 0, 8, 0x001cc0, 0x001ccf, "Sundanese Supplement" },
{ 0, 5, 0x001cd0, 0x001cff, "Vedic Extensions" },
{ 0, 0, 0x001d00, 0x001d7f, "Phonetic Extensions" },
{ 0, 0, 0x001d80, 0x001dbf, "Phonetic Extensions Supplement" },
{ 0, 1, 0x001dc0, 0x001dff, "Combining Diacritical Marks Supplement" },
{ 0, 0, 0x001e00, 0x001eff, "Latin Extended Additional" },
{ 0,23, 0x001f00, 0x001fff, "Greek Extended" },
{ 0, 1, 0x002000, 0x00206f, "General Punctuation" },
{ 0, 6, 0x002070, 0x00209f, "Superscripts and Subscripts" },
{ 0,16, 0x0020a0, 0x0020cf, "Currency Symbols" },
{ 0,15, 0x0020d0, 0x0020ff, "Combining Diacritical Marks for Symbols" },
{ 0, 0, 0x002100, 0x00214f, "Letterlike Symbols" },
{ 0, 4, 0x002150, 0x00218f, "Number Forms" },
{ 0, 0, 0x002190, 0x0021ff, "Arrows" },
{ 0, 0, 0x002200, 0x0022ff, "Mathematical Operators" },
{ 0, 0, 0x002300, 0x0023ff, "Miscellaneous Technical" },
{ 0,25, 0x002400, 0x00243f, "Control Pictures" },
{ 0,21, 0x002440, 0x00245f, "Optical Character Recognition" },
{ 0, 0, 0x002460, 0x0024ff, "Enclosed Alphanumerics" },
{ 0, 0, 0x002500, 0x00257f, "Box Drawing" },
{ 0, 0, 0x002580, 0x00259f, "Block Elements" },
{ 0, 0, 0x0025a0, 0x0025ff, "Geometric Shapes" },
{ 0, 0, 0x002600, 0x0026ff, "Miscellaneous Symbols" },
{ 0, 0, 0x002700, 0x0027bf, "Dingbats" },
{ 0, 0, 0x0027c0, 0x0027ef, "Miscellaneous Mathematical Symbols-A" },
{ 0, 0, 0x0027f0, 0x0027ff, "Supplemental Arrows-A" },
{ 0, 0, 0x002800, 0x0028ff, "Braille Patterns" },
{ 0, 0, 0x002900, 0x00297f, "Supplemental Arrows-B" },
{ 0, 0, 0x002980, 0x0029ff, "Miscellaneous Mathematical Symbols-B" },
{ 0, 0, 0x002a00, 0x002aff, "Supplemental Mathematical Operators" },
{ 0, 4, 0x002b00, 0x002bff, "Miscellaneous Symbols and Arrows" },
{ 0, 2, 0x002c00, 0x002c5f, "Glagolitic" },
{ 0, 0, 0x002c60, 0x002c7f, "Latin Extended-C" },
{ 0, 5, 0x002c80, 0x002cff, "Coptic" },
{ 0, 8, 0x002d00, 0x002d2f, "Georgian Supplement" },
{ 0,21, 0x002d30, 0x002d7f, "Tifinagh" },
{ 0,17, 0x002d80, 0x002ddf, "Ethiopic Extended" },
{ 0, 0, 0x002de0, 0x002dff, "Cyrillic Extended-A" },
{ 0,48, 0x002e00, 0x002e7f, "Supplemental Punctuation" },
{ 0,13, 0x002e80, 0x002eff, "CJK Radicals Supplement" },
{ 0,10, 0x002f00, 0x002fdf, "Kangxi Radicals" },
{ 0, 4, 0x002ff0, 0x002fff, "Ideographic Description Characters" },
{ 0, 0, 0x003000, 0x00303f, "CJK Symbols and Punctuation" },
{ 0, 3, 0x003040, 0x00309f, "Hiragana" },
{ 0, 0, 0x0030a0, 0x0030ff, "Katakana" },
{ 0, 5, 0x003100, 0x00312f, "Bopomofo" },
{ 0, 2, 0x003130, 0x00318f, "Hangul Compatibility Jamo" },
{ 0, 0, 0x003190, 0x00319f, "Kanbun" },
{ 0, 5, 0x0031a0, 0x0031bf, "Bopomofo Extended" },
{ 0,12, 0x0031c0, 0x0031ef, "CJK Strokes" },
{ 0, 0, 0x0031f0, 0x0031ff, "Katakana Phonetic Extensions" },
{ 0, 2, 0x003200, 0x0032ff, "Enclosed CJK Letters and Months" },
{ 0, 0, 0x003300, 0x0033ff, "CJK Compatibility" },
{ 0, 0, 0x003400, 0x004dbf, "CJK Unified Ideographs Extension A" },
{ 0, 0, 0x004dc0, 0x004dff, "Yijing Hexagram Symbols" },
{ 0, 0, 0x004e00, 0x009fff, "CJK Unified Ideographs" },
{ 0, 3, 0x00a000, 0x00a48f, "Yi Syllables" },
{ 0, 9, 0x00a490, 0x00a4cf, "Yi Radicals" },
{ 0, 0, 0x00a4d0, 0x00a4ff, "Lisu" },
{ 0,20, 0x00a500, 0x00a63f, "Vai" },
{ 0, 0, 0x00a640, 0x00a69f, "Cyrillic Extended-B" },
{ 0, 8, 0x00a6a0, 0x00a6ff, "Bamum" },
{ 0, 0, 0x00a700, 0x00a71f, "Modifier Tone Letters" },
{ 0,50, 0x00a720, 0x00a7ff, "Latin Extended-D" },
{ 0, 4, 0x00a800, 0x00a82f, "Syloti Nagri" },
{ 0, 6, 0x00a830, 0x00a83f, "Common Indic Number Forms" },
{ 0, 8, 0x00a840, 0x00a87f, "Phags-pa" },
{ 0,14, 0x00a880, 0x00a8df, "Saurashtra" },
{ 0, 0, 0x00a8e0, 0x00a8ff, "Devanagari Extended" },
{ 0, 0, 0x00a900, 0x00a92f, "Kayah Li" },
{ 0,11, 0x00a930, 0x00a95f, "Rejang" },
{ 0, 3, 0x00a960, 0x00a97f, "Hangul Jamo Extended-A" },
{ 0, 5, 0x00a980, 0x00a9df, "Javanese" },
{ 0, 1, 0x00a9e0, 0x00a9ff, "Myanmar Extended-B" },
{ 0,13, 0x00aa00, 0x00aa5f, "Cham" },
{ 0, 0, 0x00aa60, 0x00aa7f, "Myanmar Extended-A" },
{ 0,24, 0x00aa80, 0x00aadf, "Tai Viet" },
{ 0, 9, 0x00aae0, 0x00aaff, "Meetei Mayek Extensions" },
{ 0,16, 0x00ab00, 0x00ab2f, "Ethiopic Extended-A" },
{ 0, 8, 0x00ab30, 0x00ab6f, "Latin Extended-E" },
{ 0, 0, 0x00ab70, 0x00abbf, "Cherokee Supplement" },
{ 0, 8, 0x00abc0, 0x00abff, "Meetei Mayek" },
{ 0, 0, 0x00ac00, 0x00d7af, "Hangul Syllables" },
{ 0, 8, 0x00d7b0, 0x00d7ff, "Hangul Jamo Extended-B" },
{ 0, 0, 0x00d800, 0x00db7f, "High Surrogates" },
{ 0, 0, 0x00db80, 0x00dbff, "High Private Use Surrogates" },
{ 0, 0, 0x00dc00, 0x00dfff, "Low Surrogates" },
{ 0, 0, 0x00e000, 0x00f8ff, "Private Use Area" },
{ 0,40, 0x00f900, 0x00faff, "CJK Compatibility Ideographs" },
{ 0,22, 0x00fb00, 0x00fb4f, "Alphabetic Presentation Forms" },
{ 0,77, 0x00fb50, 0x00fdff, "Arabic Presentation Forms-A" },
{ 0, 0, 0x00fe00, 0x00fe0f, "Variation Selectors" },
{ 0, 6, 0x00fe10, 0x00fe1f, "Vertical Forms" },
{ 0, 0, 0x00fe20, 0x00fe2f, "Combining Half Marks" },
{ 0, 0, 0x00fe30, 0x00fe4f, "CJK Compatibility Forms" },
{ 0, 6, 0x00fe50, 0x00fe6f, "Small Form Variants" },
{ 0, 3, 0x00fe70, 0x00feff, "Arabic Presentation Forms-B" },
{ 0,15, 0x00ff00, 0x00ffef, "Halfwidth and Fullwidth Forms" },
{ 0,11, 0x00fff0, 0x00ffff, "Specials" },
{ 0,40, 0x010000, 0x01007f, "Linear B Syllabary" },
{ 0, 5, 0x010080, 0x0100ff, "Linear B Ideograms" },
{ 0, 7, 0x010100, 0x01013f, "Aegean Numbers" },
{ 0, 1, 0x010140, 0x01018f, "Ancient Greek Numbers" },
{ 0,51, 0x010190, 0x0101cf, "Ancient Symbols" },
{ 0, 2, 0x0101d0, 0x0101ff, "Phaistos Disc" },
{ 0, 3, 0x010280, 0x01029f, "Lycian" },
{ 0,15, 0x0102a0, 0x0102df, "Carian" },
{ 0, 4, 0x0102e0, 0x0102ff, "Coptic Epact Numbers" },
{ 0, 9, 0x010300, 0x01032f, "Old Italic" },
{ 0, 5, 0x010330, 0x01034f, "Gothic" },
{ 0, 5, 0x010350, 0x01037f, "Old Permic" },
{ 0, 1, 0x010380, 0x01039f, "Ugaritic" },
{ 0,14, 0x0103a0, 0x0103df, "Old Persian" },
{ 0, 0, 0x010400, 0x01044f, "Deseret" },
{ 0, 0, 0x010450, 0x01047f, "Shavian" },
{ 0, 8, 0x010480, 0x0104af, "Osmanya" },
{ 0, 8, 0x0104b0, 0x0104ff, "Osage" },
{ 0, 8, 0x010500, 0x01052f, "Elbasan" },
{ 0,11, 0x010530, 0x01056f, "Caucasian Albanian" },
{ 0,43, 0x010600, 0x01077f, "Linear A" },
{ 0, 9, 0x010800, 0x01083f, "Cypriot Syllabary" },
{ 0, 1, 0x010840, 0x01085f, "Imperial Aramaic" },
{ 0, 0, 0x010860, 0x01087f, "Palmyrene" },
{ 0, 8, 0x010880, 0x0108af, "Nabataean" },
{ 0, 6, 0x0108e0, 0x0108ff, "Hatran" },
{ 0, 3, 0x010900, 0x01091f, "Phoenician" },
{ 0, 5, 0x010920, 0x01093f, "Lydian" },
{ 0, 0, 0x010980, 0x01099f, "Meroitic Hieroglyphs" },
{ 0, 6, 0x0109a0, 0x0109ff, "Meroitic Cursive" },
{ 0,28, 0x010a00, 0x010a5f, "Kharoshthi" },
{ 0, 0, 0x010a60, 0x010a7f, "Old South Arabian" },
{ 0, 0, 0x010a80, 0x010a9f, "Old North Arabian" },
{ 0,13, 0x010ac0, 0x010aff, "Manichaean" },
{ 0, 3, 0x010b00, 0x010b3f, "Avestan" },
{ 0, 2, 0x010b40, 0x010b5f, "Inscriptional Parthian" },
{ 0, 5, 0x010b60, 0x010b7f, "Inscriptional Pahlavi" },
{ 0,19, 0x010b80, 0x010baf, "Psalter Pahlavi" },
{ 0, 7, 0x010c00, 0x010c4f, "Old Turkic" },
{ 0,20, 0x010c80, 0x010cff, "Old Hungarian" },
{ 0,14, 0x010d00, 0x010d3f, "Hanifi Rohingya" },
{ 0, 1, 0x010e60, 0x010e7f, "Rumi Numeral Symbols" },
{ 0, 8, 0x010f00, 0x010f2f, "Old Sogdian" },
{ 0,22, 0x010f30, 0x010f6f, "Sogdian" },
{ 0, 9, 0x010fe0, 0x010fff, "Elymaic" },
{ 0,19, 0x011000, 0x01107f, "Brahmi" },
{ 0,13, 0x011080, 0x0110cf, "Kaithi" },
{ 0,13, 0x0110d0, 0x0110ff, "Sora Sompeng" },
{ 0,10, 0x011100, 0x01114f, "Chakma" },
{ 0, 9, 0x011150, 0x01117f, "Mahajani" },
{ 0, 2, 0x011180, 0x0111df, "Sharada" },
{ 0,12, 0x0111e0, 0x0111ff, "Sinhala Archaic Numbers" },
{ 0,18, 0x011200, 0x01124f, "Khojki" },
{ 0,10, 0x011280, 0x0112af, "Multani" },
{ 0,11, 0x0112b0, 0x0112ff, "Khudawadi" },
{ 0,42, 0x011300, 0x01137f, "Grantha" },
{ 0,34, 0x011400, 0x01147f, "Newa" },
{ 0,14, 0x011480, 0x0114df, "Tirhuta" },
{ 0,36, 0x011580, 0x0115ff, "Siddham" },
{ 0,17, 0x011600, 0x01165f, "Modi" },
{ 0,19, 0x011660, 0x01167f, "Mongolian Supplement" },
{ 0,13, 0x011680, 0x0116cf, "Takri" },
{ 0, 6, 0x011700, 0x01173f, "Ahom" },
{ 0,20, 0x011800, 0x01184f, "Dogra" },
{ 0,12, 0x0118a0, 0x0118ff, "Warang Citi" },
{ 0,31, 0x0119a0, 0x0119ff, "Nandinagari" },
{ 0, 8, 0x011a00, 0x011a4f, "Zanabazar Square" },
{ 0,13, 0x011a50, 0x011aaf, "Soyombo" },
{ 0, 7, 0x011ac0, 0x011aff, "Pau Cin Hau" },
{ 0,15, 0x011c00, 0x011c6f, "Bhaiksuki" },
{ 0,12, 0x011c70, 0x011cbf, "Marchen" },
{ 0,21, 0x011d00, 0x011d5f, "Masaram Gondi" },
{ 0,17, 0x011d60, 0x011daf, "Gunjala Gondi" },
{ 0, 7, 0x011ee0, 0x011eff, "Makasar" },
{ 0,13, 0x011fc0, 0x011fff, "Tamil Supplement" },
{ 0,102, 0x012000, 0x0123ff, "Cuneiform" },
{ 0,12, 0x012400, 0x01247f, "Cuneiform Numbers and Punctuation" },
{ 0,12, 0x012480, 0x01254f, "Early Dynastic Cuneiform" },
{ 0, 1, 0x013000, 0x01342f, "Egyptian Hieroglyphs" },
{ 0, 7, 0x013430, 0x01343f, "Egyptian Hieroglyph Format Controls" },
{ 0,57, 0x014400, 0x01467f, "Anatolian Hieroglyphs" },
{ 0, 7, 0x016800, 0x016a3f, "Bamum Supplement" },
{ 0, 5, 0x016a40, 0x016a6f, "Mro" },
{ 0,12, 0x016ad0, 0x016aff, "Bassa Vah" },
{ 0,17, 0x016b00, 0x016b8f, "Pahawh Hmong" },
{ 0, 5, 0x016e40, 0x016e9f, "Medefaidrin" },
{ 0,11, 0x016f00, 0x016f9f, "Miao" },
{ 0,28, 0x016fe0, 0x016fff, "Ideographic Symbols and Punctuation" },
{ 0, 0, 0x017000, 0x0187ff, "Tangut" },
{ 0,13, 0x018800, 0x018aff, "Tangut Components" },
{ 0, 0, 0x01b000, 0x01b0ff, "Kana Supplement" },
{ 0,17, 0x01b100, 0x01b12f, "Kana Extended-A" },
{ 0,57, 0x01b130, 0x01b16f, "Small Kana Extension" },
{ 0, 4, 0x01b170, 0x01b2ff, "Nushu" },
{ 0,17, 0x01bc00, 0x01bc9f, "Duployan" },
{ 0,12, 0x01bca0, 0x01bcaf, "Shorthand Format Controls" },
{ 0,10, 0x01d000, 0x01d0ff, "Byzantine Musical Symbols" },
{ 0,25, 0x01d100, 0x01d1ff, "Musical Symbols" },
{ 0,10, 0x01d200, 0x01d24f, "Ancient Greek Musical Notation" },
{ 0,12, 0x01d2e0, 0x01d2ff, "Mayan Numerals" },
{ 0, 9, 0x01d300, 0x01d35f, "Tai Xuan Jing Symbols" },
{ 0, 7, 0x01d360, 0x01d37f, "Counting Rod Numerals" },
{ 0,28, 0x01d400, 0x01d7ff, "Mathematical Alphanumeric Symbols" },
{ 0,16, 0x01d800, 0x01daaf, "Sutton SignWriting" },
{ 0,10, 0x01e000, 0x01e02f, "Glagolitic Supplement" },
{ 0, 9, 0x01e100, 0x01e14f, "Nyiakeng Puachue Hmong" },
{ 0, 5, 0x01e2c0, 0x01e2ff, "Wancho" },
{ 0,11, 0x01e800, 0x01e8df, "Mende Kikakui" },
{ 0, 8, 0x01e900, 0x01e95f, "Adlam" },
{ 0,12, 0x01ec70, 0x01ecbf, "Indic Siyaq Numbers" },
{ 0,19, 0x01ed00, 0x01ed4f, "Ottoman Siyaq Numbers" },
{ 0,113, 0x01ee00, 0x01eeff, "Arabic Mathematical Alphabetic Symbols" },
{ 0, 4, 0x01f000, 0x01f02f, "Mahjong Tiles" },
{ 0,12, 0x01f030, 0x01f09f, "Domino Tiles" },
{ 0,14, 0x01f0a0, 0x01f0ff, "Playing Cards" },
{ 0,63, 0x01f100, 0x01f1ff, "Enclosed Alphanumeric Supplement" },
{ 0,192, 0x01f200, 0x01f2ff, "Enclosed Ideographic Supplement" },
{ 0, 0, 0x01f300, 0x01f5ff, "Miscellaneous Symbols and Pictographs" },
{ 0, 0, 0x01f600, 0x01f64f, "Emoticons" },
{ 0, 0, 0x01f650, 0x01f67f, "Ornamental Dingbats" },
{ 0,18, 0x01f680, 0x01f6ff, "Transport and Map Symbols" },
{ 0,12, 0x01f700, 0x01f77f, "Alchemical Symbols" },
{ 0,27, 0x01f780, 0x01f7ff, "Geometric Shapes Extended" },