diff options
Diffstat (limited to 'utils/HtmlFonts.cc')
-rw-r--r-- | utils/HtmlFonts.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index be02c5f3..d8334bce 100644 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -17,13 +17,14 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2007, 2010 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2007, 2010, 2012 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru> // Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com> // Copyright (C) 2010 OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar Potdar (onkar@cdacmumbai.in) // 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 @@ -81,10 +83,10 @@ GooString *HtmlFontColor::convtoX(unsigned int xcol) const{ char tmp; unsigned int k; k = (xcol/16); - if ((k>=0)&&(k<10)) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10); + if (k<10) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10); xret->append(tmp); k = (xcol%16); - if ((k>=0)&&(k<10)) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10); + if (k<10) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10); xret->append(tmp); return xret; } @@ -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){ |