forked from KolibriOS/kolibrios
Lib font.h added encode cp866 for ANSI
git-svn-id: svn://kolibrios.org@5759 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6768401e31
commit
441e5ea21e
@ -9,6 +9,10 @@
|
|||||||
#include "../lib/io.h"
|
#include "../lib/io.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define CP866 0
|
||||||
|
#define ANSI 1
|
||||||
|
|
||||||
:struct __SIZE
|
:struct __SIZE
|
||||||
{
|
{
|
||||||
word width,height;
|
word width,height;
|
||||||
@ -21,6 +25,7 @@
|
|||||||
{
|
{
|
||||||
__SIZE size;
|
__SIZE size;
|
||||||
byte width,height,offsetLine,r,g,b,weight,italic;
|
byte width,height,offsetLine,r,g,b,weight,italic;
|
||||||
|
byte encoding;
|
||||||
dword color;
|
dword color;
|
||||||
dword file_size;
|
dword file_size;
|
||||||
dword buffer;
|
dword buffer;
|
||||||
@ -149,6 +154,10 @@ FONT font = 0;
|
|||||||
IF(weight) size.width+=size.TMP_WEIGHT;
|
IF(weight) size.width+=size.TMP_WEIGHT;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
IF(!encoding){
|
||||||
|
IF(s>=128)&&(s<=175)s+=64;
|
||||||
|
ELSE IF(s>=224)&&(s<=239)s+=16;
|
||||||
|
}
|
||||||
yi = 0;
|
yi = 0;
|
||||||
iii = 0;
|
iii = 0;
|
||||||
tmp = 4*block*s;
|
tmp = 4*block*s;
|
||||||
@ -255,6 +264,11 @@ FONT font = 0;
|
|||||||
byte rw=0;
|
byte rw=0;
|
||||||
IF(s==32)return width/4;
|
IF(s==32)return width/4;
|
||||||
IF(s==9)return width;
|
IF(s==9)return width;
|
||||||
|
IF(!encoding)
|
||||||
|
{
|
||||||
|
IF(s>=128)&&(s<=175)s+=64;
|
||||||
|
ELSE IF(s>=224)&&(s<=239)s+=16;
|
||||||
|
}
|
||||||
yi = 0;
|
yi = 0;
|
||||||
iii = 0;
|
iii = 0;
|
||||||
tmp = 4*block*s;
|
tmp = 4*block*s;
|
||||||
|
Loading…
Reference in New Issue
Block a user