[cairo] [Pango-Cairo]No character displayed

Andreea Fulger andreea.fulger at parrot.com
Mon Oct 20 06:26:41 PDT 2014


Hi,

I am trying to get Pango-Cairo working in an embedded environment but I 
cannot manage to get any character displayed.

The cairo-trace tool on the pango-cairo example at 
https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html
shows me:

%!CairoScript - cairoexample
dict
   /width 300 set
   /height 300 set
   /format //ARGB32 set
   /content //COLOR_ALPHA set
   image dup /s0 exch def
context % c0
1 1 1 set-source-rgb
paint
150 150 translate
save
0.75 0 0.25 set-source-rgb
0 rotate
dict
   /type 42 set
   /pattern (DejaVu 
Sans-27:familylang=en:style=Book:stylelang=en:fullname=DejaVu 
Sans:fullnamelang=en:slant=0:weight=200:width=100:pixelsize=36:foundry=unknown:antialias=True:hintstyle=1:hinting=True:verticallayout=False:autohint=False:globaladvance=True:file=/usr/share/fonts/DejaVuSans.ttf:index=0:outline=True:scalable=True:dpi=96:fontversion=153354:fontformat=TrueType:embolden=True:embeddedbitmap=True:decorative=False:lcdfilter=1:namelang=en:prgname=cairoexample:hash=sha256\\:42a6ee317989b6b61634b3304457bc25186abdc83113d93e8f4c0a25e02e9756:postscriptname=DejaVuSans) 
set
   font % f0
dup /f0 exch def
36 0 0 36 0 0 matrix identity << /hint-metrics //HINT_METRICS_ON >> 
scaled-font /sf0 exch def
-3.5 -150 m save
sf0 set-scaled-font
[2.5 -150 <~2Z~> 3.5 -150 <~86]-~>] show-glyphs
restore
-3.5 -150 m restore
save
0.956773 0 0.0432273 set-source-rgb
0.628319 rotate
f0 36 0 0 36 0 0 matrix 0.809017 0.587785 -0.587785 0.809017 0 0 matrix 
<< /hint-metrics //HINT_METRICS_ON >> scaled-font /sf1 exch def
-3.5 -150 m save
sf1 set-scaled-font
[2.499554 -150.000119 <~2Z~> 3.499554 -150.000119 <~86]-~>] show-glyphs
restore
-3.500446 -150.000119 m restore
save
0.989074 0 0.0109262 set-source-rgb
1.256637 rotate
f0 36 0 0 36 0 0 matrix 0.309017 0.951057 -0.951057 0.309017 0 0 matrix 
<< /hint-metrics //HINT_METRICS_ON >> scaled-font /sf2 exch def
-3.5 -150 m save
sf2 set-scaled-font
[2.501856 -150.000666 <~2Z~> 3.501856 -150.000666 <~86]-~>] show-glyphs
restore
-3.498144 -150.000666 m restore
save
0.834565 0 0.165435 set-source-rgb
1.884956 rotate
f0 36 0 0 36 0 0 matrix -0.309017 0.951057 -0.951057 -0.309017 0 0 
matrix << /hint-metrics //HINT_METRICS_ON >> scaled-font /sf3 exch def
-3.5 -150 m save
sf3 set-scaled-font
[2.500149 -149.998202 <~2Z~> 3.500149 -149.998202 <~86]-~>] show-glyphs
restore
-3.499851 -149.998202 m restore
save
0.552264 0 0.447736 set-source-rgb
2.513274 rotate
f0 36 0 0 36 0 0 matrix -0.809017 0.587785 -0.587785 -0.809017 0 0 
matrix << /hint-metrics //HINT_METRICS_ON >> scaled-font /sf4 exch def
-3.5 -150 m save
sf4 set-scaled-font
[2.500397 -150.001657 <~2Z~> 3.500397 -150.001657 <~86]-~>] show-glyphs
restore
-3.499603 -150.001657 m restore
save
0.25 0 0.75 set-source-rgb
3.141593 rotate
f0 36 0 0 36 0 0 matrix -1 0.000000000000000122 -0.000000000000000122 -1 
0 0 matrix << /hint-metrics //HINT_METRICS_ON >> scaled-font /sf5 exch def
-3.5 -150 m save
sf5 set-scaled-font
[2.5 -150 <~2Z~> 3.5 -150 <~86]-~>] show-glyphs
restore
-3.5 -150 m restore
save
0.0432273 0 0.956773 set-source-rgb
3.769911 rotate
f0 36 0 0 36 0 0 matrix -0.809017 -0.587785 0.587785 -0.809017 0 0 
matrix << /hint-metrics //HINT_METRICS_ON >> scaled-font /sf6 exch def
-3.5 -150 m save
sf6 set-scaled-font
[2.499554 -150.000119 <~2Z~> 3.499554 -150.000119 <~86]-~>] show-glyphs
restore
-3.500446 -150.000119 m restore
save
0.0109262 0 0.989074 set-source-rgb
4.39823 rotate
f0 36 0 0 36 0 0 matrix -0.309017 -0.951057 0.951057 -0.309017 0 0 
matrix << /hint-metrics //HINT_METRICS_ON >> scaled-font /sf7 exch def
-3.5 -150 m save
sf7 set-scaled-font
[2.501856 -150.000666 <~2Z~> 3.501856 -150.000666 <~86]-~>] show-glyphs
restore
-3.498144 -150.000666 m restore
save
0.165435 0 0.834565 set-source-rgb
5.026548 rotate
f0 36 0 0 36 0 0 matrix 0.309017 -0.951057 0.951057 0.309017 0 0 matrix 
<< /hint-metrics //HINT_METRICS_ON >> scaled-font /sf8 exch def
-3.5 -150 m save
sf8 set-scaled-font
[2.500149 -149.998202 <~2Z~> 3.500149 -149.998202 <~86]-~>] show-glyphs
restore
-3.499851 -149.998202 m restore
save
0.447736 0 0.552264 set-source-rgb
5.654867 rotate
f0 36 0 0 36 0 0 matrix 0.809017 -0.587785 0.587785 0.809017 0 0 matrix 
<< /hint-metrics //HINT_METRICS_ON >> scaled-font /sf9 exch def
-3.5 -150 m save
sf9 set-scaled-font
[2.500397 -150.001657 <~2Z~> 3.500397 -150.001657 <~86]-~>] show-glyphs
restore
-3.499603 -150.001657 m restore
pop % c0 destroyed
% s0 (/mnt/out.png) write-to-png pop
/s0 undef

but I don't know if it's Cairo related or Fontconfig (even though if I 
use Pango and Freetype on this same environment I have no problem in 
displaying the characters).

Any idea for what might be causing my problem?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.png
Type: image/png
Size: 4167 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20141020/ce2c61ea/attachment.png>


More information about the cairo mailing list