Menu

#22 Italic, bold etc

open
nobody
None
5
2012-09-10
2010-06-21
No

I find that the attributes italic and bold are always 0. I see that there is code that examines the font names, and it may well be that none of the fonts I am encountering have names with "italic" in them. But the code also looks at properties of the GfxFont - is it expected that this does not work?

(Sorry if this is duplicated: I submitted it but it did not appear.)

Discussion

  • Herve Dejean

    Herve Dejean - 2010-06-22

    You should have True or False as value for these attributes. It usually works well. Which version are you using?

     
  • Richard Tobin

    Richard Tobin - 2010-06-30

    Sorry, they are not 0, they are "no". After looking at more files, I see some cases where italic="yes", but many where it should be "yes" but is in fact "no". I'm attaching a file (economics1.pdf) which has italic="no" for everything, even though there are several italic parts, and another (chem1.pdf) which has some italic="yes" but misses others: for example there are no italics detected in the references section at the end.

     
  • Richard Tobin

    Richard Tobin - 2010-06-30

    file with undetected italics

     
  • Richard Tobin

    Richard Tobin - 2010-06-30

    I can't upload economics.pdf because it's too big. You can find it in http://www.cogsci.ed.ac.uk/~richard/respubs/

     
  • Herve Dejean

    Herve Dejean - 2010-07-01

    Fonts are a nightmare! The bold, it, info is not always explicitly provided by flags. Sometimes, only the font name can provide such information. Here a bunch of heuristics is needed.

    Regarding economics: it's a latex file, using a specific font family: Computer Modern typeface:
    cmmi font-style: italic;
    cmmib font-style: italic; font-weight: bold;
    cmti font-style: italic;
    cmbx font-weight: bold;
    cmbxsl font-weight: bold; font-style: oblique;
    cmbx font-weight: bold;
    cmbxsl font-weight: bold; font-style: oblique;

    regarding chem: using -fullFontName, you get more info about the font (see @fontname). You will see that XX-i means italic, -b bold, -bi : bold&italic

    To my knowledge, no way to do better, but you can post the question in a xpdf or font forum.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB