Commit Graph

15 Commits

Author SHA1 Message Date
Caolán McNamara
7b4c2d8364 render text with cairo under gtk3, not headless solution
Change-Id: I309eaef08f597658c068170875733e5e1daa56ef
Reviewed-on: https://gerrit.libreoffice.org/14715
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-03 09:42:36 +00:00
Caolán McNamara
f040c43a62 tweak to return a cairo_context instead of a cairo_surface
Change-Id: Ifd5c9b1c2cc1561d9ca5dfd70ab7c3c74a1af216
2015-03-02 14:21:52 +00:00
Caolán McNamara
a33fcd1dbc bPrinter is always false, simplify
Change-Id: If40d1ccdec77c1bf0753411da71ac5c0b42c2765
2015-02-19 12:33:34 +00:00
Caolán McNamara
911f3a122a these are const inputs, we fill widths from pGlyphIds via pEncoding
Change-Id: I32d8bbc5083223b540f76a928de505d611627957
Reviewed-on: https://gerrit.libreoffice.org/14196
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-27 15:22:32 +00:00
Michael Stahl
5183910a90 rhbz#1177022: vcl: fix PDF embedding of Type 1 fonts
Problem is that for the "CM Typewriter" font the Width for "space" (32)
is exported as 0 instead of 525, which is the correct value in the AFM.

The reason is that PDFWriterImpl::emitEmbeddedFont() has various arrays
to map from font code points to Unicode code points, and there are
duplicate mappings, so the 160->32 mapping overrides 32->32.

The PrintFontManager::PrintFont::readAfmMetrics() actually creates a
Unicode to font code mapping (which may legitimately be n:1) that is
then inverted; add an additional hack to store a set of "preferred"
Unicodes so that PDFWriterImpl can pick the right Unicode.

Presumably the code that is stored explicitly via "C" or "CH" in the
AFM should take priority over more generic mappings.

Change-Id: Id4205a1cd45ba6a0a5facee1e39f70c3535e7dd4
2015-01-27 14:42:13 +01:00
Caolán McNamara
dbf15c9044 add a length arg to GetEmbedFontData
for the cases where we don't want the full result
and mark some ultra-dubious code with a TODO

Change-Id: I7cf57b8d44bbad2a6db86a8b862a757ae5062c50
Reviewed-on: https://gerrit.libreoffice.org/14189
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-27 10:45:20 +00:00
Chris Sherlock
686e35567a Revert "vcl: Reduce OpenGLX11CairoTextRender surface area to size of text bounds"
This reverts commit 35131df0ff.
2015-01-24 14:32:46 +11:00
Chris Sherlock
35131df0ff vcl: Reduce OpenGLX11CairoTextRender surface area to size of text bounds
With this patch I get the text boundary and use it to reduce the size
of the surface to this area. However, this is mainly needed for
OpenGLX11CairoTextRender, which creates a surface image and uses this
for OpenGL rendering.

Change-Id: Icffc19bed89aaa2ff84ae845d274258a6fca27da
2015-01-24 14:27:37 +11:00
Chris Sherlock
b3c6f27656 vcl: CairoTextRender::nTextColor_ to mnTextColor
Change-Id: Ia53dc393e4284989f6e967c4fa42e7ba6fc58183
2015-01-10 07:41:56 +11:00
Chris Sherlock
49a6d0151d vcl: cleanup cairotextrender.hxx
Change-Id: Ia8471c9745b86c4137297fd9cd0a3fea712a14fa
2015-01-10 07:41:56 +11:00
Louis-Francis Ratté-Boulianne
f0f5f50243 vcl: Limit Cairo surface size to the clipping region to improve performance
Conflicts:
	vcl/unx/generic/gdi/openglx11cairotextrender.cxx

Change-Id: I469b34c9f1047a274550229391d3dfb578291df6
2014-12-11 07:57:30 +01:00
Jan Holesovsky
48fa9f1e19 Revert "vcl: Abstract the Windows text rendering into a TextRenderImpl descendant."
Turns out it might be easier to actually subclass only the various SalLayout's
- let's try it first, and re-introduce this code again if not.

This reverts commit 309257ddadfdc3e46506036ed81f6e0695211ebe.
2014-11-14 00:07:05 +01:00
Jan Holesovsky
146e4f8bac vcl: Abstract the Windows text rendering into a TextRenderImpl descendant.
Change-Id: I7ee9d7e705bb0344ba59c3edd10ed85390636cd4
2014-11-13 15:52:40 +01:00
Markus Mohrhard
eff8d971c9 implementation for OpenGL text rendering in the unx backend
Change-Id: Ib1246f361d5efd13a7e36d568641c6360495604d
2014-11-10 07:59:54 +01:00
Markus Mohrhard
03df4cca18 move the abstract cairo text render code out of the unx dir
Change-Id: Ie40850916359637b983f2c303e875bc5bf041cb1
2014-11-10 07:59:10 +01:00