Open GoogleCodeExporter opened 8 years ago
If we can borrow the techniques used by iText itself, this should be relatively
straightforward to implement. It would affect font resolution, the font
wrapper object itself, font metric calculation (and indirectly layout, but we'd
get this for free), and rendering.
(That said, isn't it typical that a font family will include various weights
and styles? This is the first time a request for something like this has come
up.)
Original comment by Peter.Br...@gmail.com
on 24 Mar 2011 at 12:59
It is common, but not all fonts come with them. A good example is Arial Unicode
MS. This is an Arial font, but has no bold, italic or oblique font file.
Despite this, most word processors and other software (e.g. web browsers) can
still change the weight and style of these fonts. There is a short blurb in the
iText in Action book about this.
"If you have to use a font for which you can’t find the corresponding font
with italic or oblique style, you can use setSkew(0,25) to simulate italics ...
snip ... If you have to use a font for which you can’t find the corresponding
font with bold style, you could use setTextRenderMode(PdfContentByte .TEXT_
RENDER_MODE_FILL_STROKE, 0.5f, null) to simulate bold" ~ Chapter 3, iText in
Action
Of course though, they are using their own markup framework objects to do this
(e.g. Chunks and Phrases). I'm not sure how this translates when using a
PdfContentByte.
Original comment by loe...@gmail.com
on 24 Mar 2011 at 9:31
Does anyone know if this has been done yet? I'm having the same issue with
Tahoma and have just spent a couple of days getting a document to exact specs
and now can't seem to get the italic text italic.
Original comment by aplossystems@gmail.com
on 7 Sep 2013 at 2:59
This commit:
https://github.com/flyingsaucerproject/flyingsaucer/commit/c658cfc956e66df2b1803
a64d5a793a2ab411ce5#L5R485 seems to have implemented this, but emulating bold
gives unexpected result with colored text. The stroke color is always black no
matter what the font color is set to and the result is outlined text with black
borders.
Original comment by mati.us...@gmail.com
on 20 Sep 2013 at 11:59
I've installed it and it's doing what I'm after, thanks for heads up :)
Original comment by aplossystems@gmail.com
on 21 Sep 2013 at 12:34
Original issue reported on code.google.com by
loe...@gmail.com
on 23 Mar 2011 at 3:41