issue #455
This commit is contained in:
parent
b244eb27ee
commit
15f8840c38
|
@ -83,6 +83,9 @@ siji: bdfconv
|
|||
# ./bdfconv -v -f 1 -m '32-$$ffff' ./siji.bdf -o test1.c -n test -d ../bdf/helvB12.bdf
|
||||
./bdfconv -v -f 1 -m '32-$$ffff' ../bdf/siji_with_6x10.bdf -o test2.c -n test -d ../bdf/helvB12.bdf
|
||||
|
||||
wqy: bdfconv
|
||||
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_9pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
|
||||
|
||||
|
||||
|
||||
# http://stackoverflow.com/questions/713397/what-is-a-minimal-set-of-unicode-characters-for-reasonable-japanese-support
|
||||
|
|
|
@ -150,7 +150,21 @@ int bg_SetBitmapSize(bg_t *bg, int w, int h)
|
|||
|
||||
void bg_SetBitmapPixel(bg_t *bg, int x, int y, int value)
|
||||
{
|
||||
assert( x < bg->bitmap_width );
|
||||
static long last_encoding = 0xffffffff;
|
||||
|
||||
if ( x >= bg->bitmap_width || y >= bg->bitmap_height )
|
||||
{
|
||||
if ( last_encoding != bg->encoding )
|
||||
{
|
||||
printf("Glyph size problem: ");
|
||||
printf("encoding=%ld/0x%lx, ", bg->encoding, bg->encoding);
|
||||
printf("width=%d, height=%d, ", bg->bitmap_width, bg->bitmap_height);
|
||||
printf("requested position x=%d, y=%d\n", x, y);
|
||||
last_encoding = bg->encoding;
|
||||
}
|
||||
}
|
||||
|
||||
assert( x < ((bg->bitmap_width+7)/8)*8 );
|
||||
assert( y < bg->bitmap_height );
|
||||
assert( x >= 0 );
|
||||
assert( y >= 0 );
|
||||
|
|
|
@ -218,14 +218,24 @@ void bf_map_cmd(bf_t *bf, const char **s)
|
|||
{
|
||||
int i;
|
||||
bg_t *bg;
|
||||
static int is_log_disabled_for_single_glyphs = 0;
|
||||
|
||||
if ( **s == ',' || **s == '\0' )
|
||||
return;
|
||||
|
||||
map_cmd(s);
|
||||
|
||||
|
||||
if ( range_from != range_to )
|
||||
{
|
||||
bf_Log(bf, "Map: exclude=%d from=%ld/$%lx to=%ld/$%lx map=%ld/$%lx", is_exclude, range_from, range_from, range_to, range_to, map_to, map_to);
|
||||
}
|
||||
else if ( is_log_disabled_for_single_glyphs == 0 )
|
||||
{
|
||||
bf_Log(bf, "Map: exclude=%d from=%ld/$%lx to=%ld/$%lx map=%ld/$%lx (further single glyph logs disabled)", is_exclude, range_from, range_from, range_to, range_to, map_to, map_to);
|
||||
is_log_disabled_for_single_glyphs = 1;
|
||||
}
|
||||
|
||||
bf_Log(bf, "Map: exclude=%d from=%ld/$%lx to=%ld/$%lx map=%ld/$%lx", is_exclude, range_from, range_from, range_to, range_to, map_to, map_to);
|
||||
|
||||
for( i = 0; i < bf->glyph_cnt; i++ )
|
||||
{
|
||||
|
@ -278,7 +288,8 @@ void bf_map_list(bf_t *bf, const char **s)
|
|||
|
||||
void bf_Map(bf_t *bf, const char *map_cmd_list)
|
||||
{
|
||||
bf_Log(bf, "Map: map_cmd_list='%s'", map_cmd_list);
|
||||
if ( strlen(map_cmd_list) < 1024 )
|
||||
bf_Log(bf, "Map: map_cmd_list='%s'", map_cmd_list);
|
||||
bf_map_list(bf, &map_cmd_list);
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,8 @@ struct groupinfo gi[] = {
|
|||
{ "Tlwg (Thai-Fonts)","fntgrptlwg", "../../../../u8g2.wiki/fntgrptlwg.md", "fntgrptlwg.pre" }, /* 17 */
|
||||
{ "NBP", "fntgrpnbp", "../../../../u8g2.wiki/fntgrpnbp.md", "fntgrpnbp.pre" }, /* 18 */
|
||||
{ "UW ttyp0", "fntgrpttyp0", "../../../../u8g2.wiki/fntgrpttyp0.md", "fntgrpttyp0.pre" }, /* 19 */
|
||||
|
||||
{ "Siji Icon Font", "fntgrpsiji", "../../../../u8g2.wiki/fntgrpsiji.md", "fntgrpsiji.pre" }, /* 20 */
|
||||
{ "Wqy (Chinese Font)", "fntgrpwqy", "../../../../u8g2.wiki/fntgrpwqy.md", "fntgrpwqy.pre" }, /* 21 */
|
||||
};
|
||||
|
||||
#define BM_T 1 /* Transparent = build mode 0 proportional */
|
||||
|
@ -255,6 +256,9 @@ struct fontinfo fi[] ={
|
|||
{ 0, "10x20.bdf", "10x20", 1, 0, BM_T, FM_C, MM_C, "32-128,$400-$52f", "_cyrillic" },
|
||||
{ 0, "10x20.bdf", "10x20", 1, 35, BM_T, FM_C, MM_C, "32-128,$600-$6ff,$FB50-$FBB1,$FE70-$FEFF,x32-64,x91-96,x123-191,x247,x697-879,x32-$5ff", "_arabic" },
|
||||
|
||||
{ 0, "siji_with_6x10.bdf", "siji", 20, 0, BM_T, FM_C, MM_C, "32-128,$e000-$ffff", "_6x10" },
|
||||
{ 0, "siji_with_6x10.bdf", "siji", 20, 0, BM_T, FM_C, MM_C, "$e000-$ffff", "" },
|
||||
|
||||
|
||||
/*
|
||||
t0 includes the following pages/language support:
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
|
||||
# Reference
|
||||
|
||||
Siji icon font is available at [https://github.com/stark/siji](https://github.com/stark/siji).
|
||||
|
||||
For u8g2, the icon font is combinded with the X11 [6x10 font](fntgrpx11).
|
||||
|
||||
# Copyright
|
||||
|
||||
|
||||
Siji icon font is available under the "GNU General Public License v2.0": [https://github.com/stark/siji/blob/master/LICENSE](https://github.com/stark/siji/blob/master/LICENSE)
|
||||
|
||||
|
||||
# Font Details
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
|
||||
# Reference
|
||||
|
||||
The WenQuanYi bitmap fonts are maintained here: [http://wenq.org/wqy2/](http://wenq.org/wqy2/).
|
||||
|
||||
The u8g2 fonts are based on the bdf files from here: [https://github.com/larryli/u8g2_wqy](https://github.com/larryli/u8g2_wqy)
|
||||
|
||||
|
||||
From the font files:
|
||||
|
||||
WenQuanYi bitmap fonts include all 20,932 Unicode 5.2
|
||||
CJK Unified Ideographs (U4E00 - U9FA5) and 6,582
|
||||
CJK Extension A characters (U3400 - U4DB5) at
|
||||
5 different pixel sizes (9pt-12X12, 10pt-13X13,
|
||||
10.5pt-14x14, 11pt-15X15 and 12pt-16x16 pixel).
|
||||
Use of this bitmap font for on-screen display of Chinese
|
||||
(traditional and simplified) in web pages and elsewhere
|
||||
eliminates the annoying "blurring" problems caused by
|
||||
insufficient "hinting" of anti-aliased vector CJK fonts.
|
||||
In addition, Latin characters, Japanese Kanas and
|
||||
Korean Hangul glyphs (U+AC00~U+D7A3) are also included.
|
||||
|
||||
|
||||
# Copyright
|
||||
|
||||
From the font files:
|
||||
|
||||
```
|
||||
Copyright: (C)2004-2010, WenQuanYi Project
|
||||
Board of Trustees and Qianqian Fang
|
||||
License : GPL v2 (with font embedding exception)
|
||||
```
|
||||
|
||||
# Font Details
|
||||
|
Loading…
Reference in New Issue