diff options
author | Luis Parravicini <lparravi@gmail.com> | 2012-05-28 23:44:17 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2012-05-28 23:46:07 +0200 |
commit | 20210fbb6117649b20f6930031f24b8fc97b773d (patch) | |
tree | ef66bdae4f2c9c02d9644a3c90ccffc7202ed4a7 /utils | |
parent | 03f979a7e59c4eb5ecb8acc324c7faf700144589 (diff) |
pdftohtml: Add -fontfullname
Outputs the font name without any substitutions. Bug #49872
Diffstat (limited to 'utils')
-rw-r--r-- | utils/HtmlFonts.cc | 4 | ||||
-rw-r--r-- | utils/pdftohtml.1 | 3 | ||||
-rw-r--r-- | utils/pdftohtml.cc | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index be02c5f3..e0ea8a77 100644 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -24,6 +24,7 @@ // Copyright (C) 2011 Joshua Richardson <jric@chegg.com> // Copyright (C) 2011 Stephen Reichling <sreichling@chegg.com> // Copyright (C) 2012 Igor Slepchin <igor.slepchin@gmail.com> +// Copyright (C) 2012 Luis Parravicini <lparravi@gmail.com> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -63,6 +64,7 @@ static Fonts fonts[font_num+1]={ #define xoutRound(x) ((int)(x + 0.5)) extern GBool xml; +extern GBool fontFullName; GooString* HtmlFont::DefaultFont=new GooString("Times"); // Arial,Helvetica,sans-serif @@ -318,7 +320,7 @@ GooString* HtmlFontAccu::CSStyle(int i, int j){ HtmlFont font=*g; GooString *Size=GooString::fromInt(font.getSize()); GooString *colorStr=font.getColor().toString(); - GooString *fontName=font.getFontName(); + GooString *fontName=(fontFullName ? font.getFullName() : font.getFontName()); GooString *lSize; if(!xml){ diff --git a/utils/pdftohtml.1 b/utils/pdftohtml.1 index fe9ec678..f08fccb8 100644 --- a/utils/pdftohtml.1 +++ b/utils/pdftohtml.1 @@ -85,6 +85,9 @@ override document DRM settings adjust the word break threshold percent. Default is 10. Word break occurs when distance between two adjacent characters is greater than this percent of character height. +.TP +.B \-fontfullname +outputs the font name without any substitutions. .SH AUTHOR diff --git a/utils/pdftohtml.cc b/utils/pdftohtml.cc index cff09643..97372be1 100644 --- a/utils/pdftohtml.cc +++ b/utils/pdftohtml.cc @@ -21,6 +21,7 @@ // Copyright (C) 2011 Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> // Copyright (C) 2012 Igor Slepchin <igor.redhat@gmail.com> // Copyright (C) 2012 Ihar Filipau <thephilips@gmail.com> +// Copyright (C) 2012 Luis Parravicini <lparravi@gmail.com> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -82,6 +83,7 @@ double wordBreakThreshold=10; // 10%, below converted into a coefficient - 0.1 GBool showHidden = gFalse; GBool noMerge = gFalse; +GBool fontFullName = gFalse; static char ownerPassword[33] = ""; static char userPassword[33] = ""; static GBool printVersion = gFalse; @@ -138,6 +140,8 @@ static const ArgDesc argDesc[] = { "override document DRM settings"}, {"-wbt", argFP, &wordBreakThreshold, 0, "word break threshold (default 10 percent)"}, + {"-fontfullname", argFlag, &fontFullName, 0, + "outputs font full name"}, {NULL} }; |