I have now upgraded to 1.8.1 and am still unable to use PDFBox to determine whether the font(s) are bold. I would be very grateful indeed if someone could take a few minutes to see whether this is a problem with the fonts, PDFBox or my usage.
A typical PDF is at https://bitbucket.org/petermr/svg2xml-dev/src/abefe9960a8a/src/test/resources/pdfs/bmc/174.pdf (there are no copyright restrictions) and typical fonts (there are several more) are: "AdvOTce3d9a73" which I believe to be bold and "AdvOT56309c18.I" which I believe to be bold and italic Many thanks to anyone who can give help. P. On Mon, May 13, 2013 at 11:55 AM, Peter Murray-Rust <[email protected]> wrote: > > > > On Mon, May 13, 2013 at 11:14 AM, Maruan Sahyoun > <[email protected]>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 <[email protected]>: >> >> > 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 > -- Peter Murray-Rust Reader in Molecular Informatics Unilever Centre, Dep. Of Chemistry University of Cambridge CB2 1EW, UK +44-1223-763069

