vandeseer / easytable

Small table drawing library built upon Apache PDFBox
MIT License
246 stars 94 forks source link

How to make the font bold in case i use a font other than specified in PDFBOX #68

Closed Daya2006 closed 4 years ago

Daya2006 commented 4 years ago

Hi,

I am trying to use a different font which is not part of default pdfbox. so loading the ttf file for that font and adding modifying the contentstream to use that font. but i am not able to make the font bold where needed in tables. like some columns require bold for the same font and some does not. can you tell me if its possible to bold the font (without using existing fonts like times bold) etc

vandeseer commented 4 years ago

Have a look at this thread on stackoverflow:

As said in the answer of the linked stackoverflow post:

The preferable way for creating bold (or otherwise styled) text is to use a font variant which has been created explicitly for that variant.