pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Murray-Rust <pm...@cam.ac.uk>
Subject Re: Determining whether character/font is bold
Date Mon, 13 May 2013 10:55:51 GMT
On Mon, May 13, 2013 at 11:14 AM, Maruan Sahyoun <sahyoun@fileaffairs.de>wrote:

> Hi Peter,
>
> which version of PDFBox are you using? If you are still on 1.7 I'd suggest
> you upgrade to 1.8.1 as there were several enhancements to TrueType
> handling.
>
> Thanks,
Yes I was on 1.7 and I'll upgrade and report. However these fonts are so
non-conformant I am only semi-optimistic. Assuming it doesn't work, is
there still a way of determining bold?

P.



> BR
> Maruan
>
> Am 13.05.2013 um 10:55 schrieb Peter Murray-Rust <pm286@cam.ac.uk>:
>
> > I am dealing with a number of (highly non-standard) fonts and wish to
> > determine whether the font is bold (and probably other attributes). The
> > fontDescriptors are sometimes missing and often return null of zero
> values
> > (e.g. for fontDescriptor.getFontWeight() or fontDescriptor.isForceBold().
> > Yet the font displays as bold (presumably because the boldness is encoded
> > in the glyph information).
> >
> > Are there ways (I will gladly accept heuristics) for determining that a
> > font is bold when this cannot be determined from the font descriptor of
> the
> > font name, which occasionally has a ".B" but often does not.
> >
> > At present I simply compile a list of fonts, so any help welcomed.
> >
> >
> > --
> > Peter Murray-Rust
> > Reader in Molecular Informatics
> > Unilever Centre, Dep. Of Chemistry
> > University of Cambridge
> > CB2 1EW, UK
> > +44-1223-763069
>



-- 
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message