git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c641a4
)
pass font id to loadfont
author
kramm
<kramm>
Fri, 16 Jun 2006 07:03:39 +0000
(07:03 +0000)
committer
kramm
<kramm>
Fri, 16 Jun 2006 07:03:39 +0000
(07:03 +0000)
lib/gfxfont.c
patch
|
blob
|
history
lib/gfxfont.h
patch
|
blob
|
history
diff --git
a/lib/gfxfont.c
b/lib/gfxfont.c
index
6ec1a4f
..
21c85ab
100644
(file)
--- a/
lib/gfxfont.c
+++ b/
lib/gfxfont.c
@@
-136,7
+136,7
@@
static void glyph_clear(gfxglyph_t*g)
static int errorno = 0;
static int errorno = 0;
-gfxfont_t* gfxfont_load(char*filename, double quality)
+gfxfont_t* gfxfont_load(char*id, char*filename, double quality)
{
FT_Face face;
FT_Error error;
{
FT_Face face;
FT_Error error;
@@
-179,6
+179,7
@@
gfxfont_t* gfxfont_load(char*filename, double quality)
//font->leading = font->layout->ascent + font->layout->descent;
//font->encoding = FONT_ENCODING_UNICODE;
font->max_unicode = 0;
//font->leading = font->layout->ascent + font->layout->descent;
//font->encoding = FONT_ENCODING_UNICODE;
font->max_unicode = 0;
+ font->id = strdup(id);
font->glyphs = rfx_calloc(face->num_glyphs*sizeof(gfxglyph_t));
glyph2unicode = rfx_calloc(face->num_glyphs*sizeof(int));
font->glyphs = rfx_calloc(face->num_glyphs*sizeof(gfxglyph_t));
glyph2unicode = rfx_calloc(face->num_glyphs*sizeof(int));
diff --git
a/lib/gfxfont.h
b/lib/gfxfont.h
index
9644213
..
9cf3d4c
100644
(file)
--- a/
lib/gfxfont.h
+++ b/
lib/gfxfont.h
@@
-32,7
+32,7
@@
extern "C" {
/* The quality parameter is given by 1 divided by the zoom factor at which the font
still looks good. 1=normal, 0.5=double resolution etc. */
/* The quality parameter is given by 1 divided by the zoom factor at which the font
still looks good. 1=normal, 0.5=double resolution etc. */
-gfxfont_t* gfxfont_load(char*filename, double quality);
+gfxfont_t* gfxfont_load(char*id, char*filename, double quality);
void gfxfont_free(gfxfont_t*font);
#ifdef __cplusplus
void gfxfont_free(gfxfont_t*font);
#ifdef __cplusplus