rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/ @ 323  →  / @ 324
/bdf2ttf/src/bdf2ttf.cpp
@@ -102,6 +102,7 @@
char *g_version_cp = NULL;
char *g_trademark = TRADEMARK;
char *g_trademark_cp = NULL;
int g_flag_glyph_offset = 0;
 
int
emCalc(int pix, int base)
@@ -463,17 +464,12 @@
// table body
sh->addLong(imgsize); // imageSize
// bigMetrics
#ifdef USE_GLYPH_OFFSET
/*
* ƒx[ƒXƒ‰ƒCƒ“‚ð‰Á–¡‚·‚é•û–@Bƒrƒbƒgƒ}ƒbƒvƒtƒHƒ“ƒg‚ðˆµ‚¤ã‚Å‚Í
* •s—˜‚Ȃ̂ŁAŒ»Ý‚ÍŽg‚Á‚Ä‚¢‚È‚¢B
*/
glyph = bdf_get_glyph(bdf, encStart);
add_bigGlyphMetrics(sh, h, w, 0, h + glyph->bbx.offset.y, w,
- w / 2, 0, h);
#else
add_bigGlyphMetrics(sh, h, w, 0, h, w, - w / 2, 0, h);
#endif
if (g_flag_glyph_offset) {
glyph = bdf_get_glyph(bdf, encStart);
add_bigGlyphMetrics(sh, h, w, 0, h + glyph->bbx.offset.y, w,
- w / 2, 0, h);
} else
add_bigGlyphMetrics(sh, h, w, 0, h, w, - w / 2, 0, h);
 
for (j = encStart; j <= encEnd; ++j)
{
@@ -536,7 +532,7 @@
int a = bdf->ascent;
int d = -bdf->descent;
#else
int a = width;
int a = height;
int d = 0;
#endif
int s = origsize;
/bdf2ttf/src/bdf2ttf.h
@@ -23,6 +23,7 @@
BDF2TTF_EXTERN char *g_version_cp;
BDF2TTF_EXTERN char *g_trademark;
BDF2TTF_EXTERN char *g_trademark_cp;
BDF2TTF_EXTERN int g_flag_glyph_offset;
 
#ifdef __cplusplus
extern "C" {
/bdf2ttf/src/main.c
@@ -37,6 +37,7 @@
int flag_italic = 0;
int flag_stylecheck = 1;
int verbose_level = 0;
int flag_glyph_offset = 0;
 
++argv;
--argc;
@@ -49,6 +50,8 @@
flag_bold = 1;
else if (!strcmp(p, "i") || !strcmp(p, "-italic"))
flag_italic = 1;
else if (!strcmp(p, "g") || !strcmp(p, "-glyph-offset"))
flag_glyph_offset = 1;
else if (!strcmp(p, "v") || !strcmp(p, "-verbose"))
++verbose_level;
else if (!strcmp(p, "-no-autoname"))
@@ -103,6 +106,8 @@
g_version_cp = g_version_cp ? g_version_cp : g_version;
g_trademark_cp = g_trademark_cp ? g_trademark_cp: g_trademark;
 
g_flag_glyph_offset = flag_glyph_offset;
 
/* Read BDF files */
font = bdf2_open();
font->verbose = verbose_level;