You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Edson Alves Pereira <lo...@gmail.com> on 2012/01/06 14:27:29 UTC

How to identify if the font is Bold and size from a TextPosition?

Hello folks, does anyone known where can i identify if a TextPosition
contain a bold character?

Regards,
lottalava

Re: How to identify if the font is Bold and size from a TextPosition?

Posted by Edson Alves Pereira <lo...@gmail.com>.
Hello Sebastian, i already checked FontDescriptor and the font i was trying
to check isForceBold=false even if look in pdf as bold.There's a
fontManager, but it use font's name to validade if is bold or not and in my
case, the font don't has bold in it's name.

On Sun, Jan 8, 2012 at 9:01 AM, Sébastien Dailly <se...@chimrod.com>wrote:

> Le 06/01/2012 14:27, Edson Alves Pereira a écrit :
>
>  Hello folks, does anyone known where can i identify if a TextPosition
>> contain a bold character?
>>
>>
> Take a look in the Font Descriptor Flag (see 9.8.2 in PDF Reference Book)
> : there is a « ForceBold » flag, maybe your font has the flag setted.
>
> http://pdfbox.apache.org/**apidocs/org/apache/pdfbox/**pdmodel/font/**
> PDFontDescriptorDictionary.**html#**PDFontDescriptorDictionary(**
> org.apache.pdfbox.cos.**COSDictionary)<http://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/font/PDFontDescriptorDictionary.html#PDFontDescriptorDictionary%28org.apache.pdfbox.cos.COSDictionary%29>
>

Re: How to identify if the font is Bold and size from a TextPosition?

Posted by Sébastien Dailly <se...@chimrod.com>.
Le 06/01/2012 14:27, Edson Alves Pereira a écrit :
> Hello folks, does anyone known where can i identify if a TextPosition
> contain a bold character?
>

Take a look in the Font Descriptor Flag (see 9.8.2 in PDF Reference Book) : there is a « ForceBold » flag, maybe your font has the flag setted.

http://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/font/PDFontDescriptorDictionary.html#PDFontDescriptorDictionary(org.apache.pdfbox.cos.COSDictionary)