summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2008-08-14 17:57:51 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2008-08-14 17:57:51 +0200
commit40a53a5580a820a72fbcdb67f3a88e842733c47b (patch)
treecbb892bf016493c609dc1c94ad8dbc63e368f771
parent9f9a0a1fb508b7fd9c04cbe076b5d7b9d3001ccf (diff)
downloadmupdf-40a53a5580a820a72fbcdb67f3a88e842733c47b.tar.xz
Whitespace fixes.
-rw-r--r--mupdf/pdf_font.c22
-rw-r--r--mupdf/pdf_fontfilems.c70
2 files changed, 46 insertions, 46 deletions
diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c
index 4a55b18a..cedf86cb 100644
--- a/mupdf/pdf_font.c
+++ b/mupdf/pdf_font.c
@@ -72,17 +72,17 @@ char *ft_errstr(int err)
static int ftkind(FT_Face face)
{
- const char *kind = FT_Get_X11_Font_Format(face);
- pdf_logfont("ft font format %s\n", kind);
- if (!strcmp(kind, "TrueType"))
- return TRUETYPE;
- if (!strcmp(kind, "Type 1"))
- return TYPE1;
- if (!strcmp(kind, "CFF"))
- return TYPE1;
- if (!strcmp(kind, "CID Type 1"))
- return TYPE1;
- return UNKNOWN;
+ const char *kind = FT_Get_X11_Font_Format(face);
+ pdf_logfont("ft font format %s\n", kind);
+ if (!strcmp(kind, "TrueType"))
+ return TRUETYPE;
+ if (!strcmp(kind, "Type 1"))
+ return TYPE1;
+ if (!strcmp(kind, "CFF"))
+ return TYPE1;
+ if (!strcmp(kind, "CID Type 1"))
+ return TYPE1;
+ return UNKNOWN;
}
static inline int ftcidtogid(pdf_font *font, int cid)
diff --git a/mupdf/pdf_fontfilems.c b/mupdf/pdf_fontfilems.c
index f5ad7fda..e4f15af6 100644
--- a/mupdf/pdf_fontfilems.c
+++ b/mupdf/pdf_fontfilems.c
@@ -587,12 +587,12 @@ pdf_createfontlistMS()
if (szFile[strlen(szFile)-1] == 'c' || szFile[strlen(szFile)-1] == 'C')
{
err = parseTTCs(szFile);
- // ignore error parsing a given font file
+ // ignore error parsing a given font file
}
else if (szFile[strlen(szFile)-1] == 'f'|| szFile[strlen(szFile)-1] == 'F')
{
err = parseTTFs(szFile);
- // ignore error parsing a given font file
+ // ignore error parsing a given font file
}
}
@@ -625,42 +625,42 @@ pdf_destoryfontlistMS()
fz_error *
pdf_lookupfontMS(char *fontname, char **fontpath, int *index)
{
- pdf_fontmapMS fontmap;
- pdf_fontmapMS *found = nil;
- char *pattern;
- int i;
-
- if (fontlistMS.len == 0)
- return fz_throw("fonterror : no fonts in the system");
-
- pattern = fontname;
- for (i = 0; i < ARRAY_SIZE(basenames); i++)
- {
- if (0 == strcmp(fontname, basenames[i]))
- {
- pattern = basepatterns[i];
- break;
- }
- }
-
- strlcpy(fontmap.fontface,pattern,sizeof(fontmap.fontface));
- found = localbsearch(&fontmap, fontlistMS.fontmap, fontlistMS.len, sizeof(pdf_fontmapMS),compare);
+ pdf_fontmapMS fontmap;
+ pdf_fontmapMS *found = nil;
+ char *pattern;
+ int i;
+
+ if (fontlistMS.len == 0)
+ return fz_throw("fonterror : no fonts in the system");
+
+ pattern = fontname;
+ for (i = 0; i < ARRAY_SIZE(basenames); i++)
+ {
+ if (0 == strcmp(fontname, basenames[i]))
+ {
+ pattern = basepatterns[i];
+ break;
+ }
+ }
+
+ strlcpy(fontmap.fontface,pattern,sizeof(fontmap.fontface));
+ found = localbsearch(&fontmap, fontlistMS.fontmap, fontlistMS.len, sizeof(pdf_fontmapMS),compare);
#if 0
- if (!found)
- found = findlinear(&fontlistMS, &fontmap);
+ if (!found)
+ found = findlinear(&fontlistMS, &fontmap);
#endif
- if (found)
- {
- *fontpath = found->fontpath;
- *index = found->index;
- }
- else
- {
- *fontpath = fontlistMS.fontmap[0].fontpath;
- *index = fontlistMS.fontmap[0].index;
- }
+ if (found)
+ {
+ *fontpath = found->fontpath;
+ *index = found->index;
+ }
+ else
+ {
+ *fontpath = fontlistMS.fontmap[0].fontpath;
+ *index = fontlistMS.fontmap[0].index;
+ }
return fz_okay;
}
@@ -671,7 +671,7 @@ static fz_error *initfontlibs(void)
{
int fterr;
int maj, min, pat;
- fz_error *err;
+ fz_error *err;
if (ftlib)
return fz_okay;