Hi Peter,

Am 13.05.2013 um 19:44 schrieb Peter Murray-Rust <[email protected]>:

> Thanks for answering - any help is valuable.
> 
> On Mon, May 13, 2013 at 6:02 PM, Maruan Sahyoun <[email protected]>wrote:
> 
>> Hi Peter,
>> 
>> I don't think that it's possible to say that a font is bold wo the
>> description of saying so. You could compare some of the characteristics of
>> a glyph to make a decision e.g. if you have similar fonts. I'm not the
>> expert on fonts though so maybe others are better suited to give a trustful
>> answer.
>> 
> 
> I understand the logic. Where a font has a fontWeight then there is a
> heuristic cutoff - PDFBox itself quotes:
> 
> /**         * The weight of the font.  According to the PDF spec "possible
> values are
>         * 100, 200, 300, 400, 500, 600, 700, 800 or 900"  Where a higher
> number is
>         * more weight and appears to be more bold. */
> 
> I have found in one case that setting fontWeight to 410 was useful.
> 
> I assume the fontWeight must do something! Does it create the font-fill in
> a grey scale (or colour scale)? Or does it fill in the font with lines?


Yes it does something see 
[http://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/font/PDFont.html#setWidths%28java.util.List%29].
 But you would expect that the setting in the font file/the width table for the 
chars it what is used in the pdf when it was created to set the text positions 
for example. So for parsing the width is part of the pdf. For creation setting 
the width is useful.


> 
> Eliot Kimber:
> 
>>>> You would expect to see something in the font name that indicates
> boldness,
> like "bold", "heavy", etc., but that's not 100% reliable.
> 
> And so would I, but in the realm of scholarly publishing where we spend
> huge amounts of money (10 billion dollars) the fonts are of appalling
> quality. "AdvOTce3d9a73" is actually a bold font, with a symbol (not
> Unicode encoding).
> I have had to find this out empirically. The only
> practical answer seems to be crowdsourcing or to read the glyphs and find
> out what is going on. Which is why it is useful to know where the
> fontWeight is applied.
> 
> P
> 
> 
> Cheers,
> 
> E.
> -- 
> Peter Murray-Rust
> Reader in Molecular Informatics
> Unilever Centre, Dep. Of Chemistry
> University of Cambridge
> CB2 1EW, UK
> +44-1223-763069

BR
Maruan

Reply via email to