turn on cairo rendering of vertical text

This commit is contained in:
Caolán McNamara 2011-08-12 23:35:07 +01:00
parent 28f5e1b27c
commit 9892df24a5
3 changed files with 7 additions and 7 deletions

Binary file not shown.

View File

@ -870,7 +870,7 @@ public:
{ {
FcPatternDestroy(mpPattern); FcPatternDestroy(mpPattern);
} }
virtual void *GetPattern(void * face, bool bEmbolden, bool bVerticalLayout) const virtual void *GetPattern(void * face, bool bEmbolden, bool /*bVerticalLayout*/) const
{ {
FcValue value; FcValue value;
value.type = FcTypeFTFace; value.type = FcTypeFTFace;
@ -879,8 +879,10 @@ public:
FcPatternAdd (mpPattern, FC_FT_FACE, value, FcTrue); FcPatternAdd (mpPattern, FC_FT_FACE, value, FcTrue);
FcPatternDel(mpPattern, FC_EMBOLDEN); FcPatternDel(mpPattern, FC_EMBOLDEN);
FcPatternAddBool(mpPattern, FC_EMBOLDEN, bEmbolden ? FcTrue : FcFalse); FcPatternAddBool(mpPattern, FC_EMBOLDEN, bEmbolden ? FcTrue : FcFalse);
#if 0
FcPatternDel(mpPattern, FC_VERTICAL_LAYOUT); FcPatternDel(mpPattern, FC_VERTICAL_LAYOUT);
FcPatternAddBool(mpPattern, FC_VERTICAL_LAYOUT, bVerticalLayout ? FcTrue : FcFalse); FcPatternAddBool(mpPattern, FC_VERTICAL_LAYOUT, bVerticalLayout ? FcTrue : FcFalse);
#endif
return mpPattern; return mpPattern;
} }
FcPattern* mpPattern; FcPattern* mpPattern;

View File

@ -454,9 +454,9 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
&text_extents); &text_extents);
xdiff = -text_extents.x_advance/nHeight; xdiff = -text_extents.x_advance/nHeight;
//deliberate bug here for temp render-like-X11-impl, //to restore an apparent bug in the original X11 impl, replace
//nWidth should be nHeight below //nHeight with nWidth below
xdiff += font_extents.descent/nWidth; xdiff += font_extents.descent/nHeight;
} }
cairo_matrix_translate(&m, xdiff, ydiff); cairo_matrix_translate(&m, xdiff, ydiff);
} }
@ -834,9 +834,7 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
{ {
// draw complex text // draw complex text
ServerFont& rFont = rLayout.GetServerFont(); ServerFont& rFont = rLayout.GetServerFont();
const bool bVertical = rFont.GetFontSelData().mbVertical; if( isCairoRenderable(rFont) )
if( !bVertical && isCairoRenderable(rFont) )
DrawCairoAAFontString( rLayout ); DrawCairoAAFontString( rLayout );
else else
{ {