kermitt2 / pdfalto

PDF to XML ALTO file converter
GNU General Public License v2.0
216 stars 70 forks source link

Bold check doesn't support fonts named "fontname-heavy" #131

Open mira-cb opened 3 years ago

mira-cb commented 3 years ago

Had some issues with text in Franklin Gothic that was bolded but not being marked as such. The font name was "franklingothic-heavy". I resolved this by checking for "heavy" as well as "bold" in the font name (at https://github.com/kermitt2/pdfalto/blob/master/src/XmlAltoOutputDev.cc#L609 and https://github.com/kermitt2/pdfalto/blob/master/src/XmlAltoOutputDev.cc#L932). I'm not sure how widespread this is or how many fonts are affected.