fontsrv: handle non-BMP runes on X11
Have to adjust algorithms to deal with much larger number of subfont files as well.
This commit is contained in:
parent
a6ad39aaaa
commit
5f0fa185d0
4 changed files with 45 additions and 44 deletions
|
|
@ -85,20 +85,23 @@ load(XFont *f)
|
|||
|
||||
int idx = charcode/SubfontSize;
|
||||
|
||||
if(charcode > 0xffff)
|
||||
if(charcode > Runemax)
|
||||
break;
|
||||
|
||||
if(!f->range[idx]) {
|
||||
if(!f->range[idx])
|
||||
f->range[idx] = 1;
|
||||
f->nrange++;
|
||||
}
|
||||
}
|
||||
// libdraw expects U+0000 to be present
|
||||
if(!f->range[0]) {
|
||||
f->range[0] = 1;
|
||||
f->nrange++;
|
||||
}
|
||||
FT_Done_Face(face);
|
||||
|
||||
// libdraw expects U+0000 to be present
|
||||
if(!f->range[0])
|
||||
f->range[0] = 1;
|
||||
|
||||
// fix up file list
|
||||
for(i=0; i<nelem(f->range); i++)
|
||||
if(f->range[i])
|
||||
f->file[f->nfile++] = i;
|
||||
|
||||
f->loaded = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue