summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fitz/font.h18
-rw-r--r--include/fitz/text.h2
-rw-r--r--include/mupdf.h26
3 files changed, 30 insertions, 16 deletions
diff --git a/include/fitz/font.h b/include/fitz/font.h
index 743d87fa..b915755b 100644
--- a/include/fitz/font.h
+++ b/include/fitz/font.h
@@ -6,13 +6,15 @@ typedef struct fz_glyphcache_s fz_glyphcache;
struct fz_hmtx_s
{
- unsigned short c;
+ unsigned short lo;
+ unsigned short hi;
short w;
};
struct fz_vmtx_s
{
- unsigned short c;
+ unsigned short lo;
+ unsigned short hi;
short x;
short y;
short w;
@@ -35,6 +37,9 @@ struct fz_font_s
int nvmtx, vmtxcap;
fz_vmtx dvmtx;
fz_vmtx *vmtx;
+
+ int ncidtogid;
+ unsigned short *cidtogid;
};
struct fz_glyph_s
@@ -48,14 +53,15 @@ void fz_freefont(fz_font *font);
void fz_debugfont(fz_font *font);
void fz_setfontwmode(fz_font *font, int wmode);
void fz_setfontbbox(fz_font *font, int xmin, int ymin, int xmax, int ymax);
+void fz_setcidtogid(fz_font *font, int n, unsigned short *map);
void fz_setdefaulthmtx(fz_font *font, int w);
void fz_setdefaultvmtx(fz_font *font, int y, int w);
-fz_error *fz_addhmtx(fz_font *font, int gid, int w);
-fz_error *fz_addvmtx(fz_font *font, int gid, int x, int y, int w);
+fz_error *fz_addhmtx(fz_font *font, int lo, int hi, int w);
+fz_error *fz_addvmtx(fz_font *font, int lo, int hi, int x, int y, int w);
fz_error *fz_endhmtx(fz_font *font);
fz_error *fz_endvmtx(fz_font *font);
-fz_hmtx fz_gethmtx(fz_font *font, int gid);
-fz_vmtx fz_getvmtx(fz_font *font, int gid);
+fz_hmtx fz_gethmtx(fz_font *font, int cid);
+fz_vmtx fz_getvmtx(fz_font *font, int cid);
fz_error *fz_newglyphcache(fz_glyphcache **arenap, int slots, int size);
fz_error *fz_renderglyph(fz_glyphcache*, fz_glyph*, fz_font*, int, fz_matrix);
diff --git a/include/fitz/text.h b/include/fitz/text.h
index c28d96c7..1a321f8f 100644
--- a/include/fitz/text.h
+++ b/include/fitz/text.h
@@ -3,7 +3,7 @@ typedef struct fz_textel_s fz_textel;
struct fz_textel_s
{
float x, y;
- int g;
+ int cid;
};
struct fz_textnode_s
diff --git a/include/mupdf.h b/include/mupdf.h
index 29f0754b..3c766740 100644
--- a/include/mupdf.h
+++ b/include/mupdf.h
@@ -159,13 +159,21 @@ struct pdf_font_s
void *ftface;
+ /* FontDescriptor */
+ int flags;
+ float italicangle;
+ float ascent;
+ float descent;
+ float capheight;
+ float xheight;
+ float missingwidth;
+
+ /* Encoding (CMap) */
fz_cmap *encoding;
- int cidtogidlen;
- int *cidtogidmap;
+ /* Raw data for freetype */
char *filename;
- char *fontdata;
- int fontlen;
+ fz_buffer *fontdata;
};
struct pdf_type3_s
@@ -250,13 +258,13 @@ void pdf_freepagetree(pdf_pagetree *pages);
fz_error *pdf_parsecmap(fz_cmap **cmapp, fz_file *file);
fz_error *pdf_loadembeddedcmap(fz_cmap **cmapp, pdf_xref *xref, fz_obj *stmref);
fz_error *pdf_loadsystemcmap(fz_cmap **cmapp, char *name);
-fz_error *pdf_makeidentitycmap(fz_cmap **cmapp, int wmode);
+fz_error *pdf_makeidentitycmap(fz_cmap **cmapp, int wmode, int bytes);
/* fontfile.c */
-fz_error *pdf_loadbuiltinfont(void **fontp, char *pattern);
-fz_error *pdf_loadsystemfont(void **fontp, char *basefont, char *collection);
-fz_error *pdf_loadembeddedfont(void **fontp, pdf_xref *xref, fz_obj *stmref);
-fz_error *pdf_loadfontdescriptor(void **fontp, pdf_xref *xref, fz_obj *desc, char *collection);
+fz_error *pdf_loadbuiltinfont(pdf_font *font, char *basefont);
+fz_error *pdf_loadsystemfont(pdf_font *font, char *basefont, char *collection);
+fz_error *pdf_loadsubstitutefont(pdf_font *font, int fdflags, char *collection);
+fz_error *pdf_loadfontdescriptor(pdf_font *font, pdf_xref *xref, fz_obj *desc, char *collection);
/* font.c */
fz_error *pdf_loadfont(pdf_font **fontp, pdf_xref *xref, fz_obj *font);