Commit 20210fbb authored by Luis Parravicini's avatar Luis Parravicini Committed by Albert Astals Cid

pdftohtml: Add -fontfullname

Outputs the font name without any substitutions. Bug #49872
parent 03f979a7
......@@ -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){
......
......@@ -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
......
......@@ -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}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment