turn on cairo rendering of vertical text
This commit is contained in:
parent
28f5e1b27c
commit
9892df24a5
BIN
qadevOOo/testdocs/vertical-testcase.odt
Normal file
BIN
qadevOOo/testdocs/vertical-testcase.odt
Normal file
Binary file not shown.
@ -870,7 +870,7 @@ public:
|
||||
{
|
||||
FcPatternDestroy(mpPattern);
|
||||
}
|
||||
virtual void *GetPattern(void * face, bool bEmbolden, bool bVerticalLayout) const
|
||||
virtual void *GetPattern(void * face, bool bEmbolden, bool /*bVerticalLayout*/) const
|
||||
{
|
||||
FcValue value;
|
||||
value.type = FcTypeFTFace;
|
||||
@ -879,8 +879,10 @@ public:
|
||||
FcPatternAdd (mpPattern, FC_FT_FACE, value, FcTrue);
|
||||
FcPatternDel(mpPattern, FC_EMBOLDEN);
|
||||
FcPatternAddBool(mpPattern, FC_EMBOLDEN, bEmbolden ? FcTrue : FcFalse);
|
||||
#if 0
|
||||
FcPatternDel(mpPattern, FC_VERTICAL_LAYOUT);
|
||||
FcPatternAddBool(mpPattern, FC_VERTICAL_LAYOUT, bVerticalLayout ? FcTrue : FcFalse);
|
||||
#endif
|
||||
return mpPattern;
|
||||
}
|
||||
FcPattern* mpPattern;
|
||||
|
@ -454,9 +454,9 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
|
||||
&text_extents);
|
||||
|
||||
xdiff = -text_extents.x_advance/nHeight;
|
||||
//deliberate bug here for temp render-like-X11-impl,
|
||||
//nWidth should be nHeight below
|
||||
xdiff += font_extents.descent/nWidth;
|
||||
//to restore an apparent bug in the original X11 impl, replace
|
||||
//nHeight with nWidth below
|
||||
xdiff += font_extents.descent/nHeight;
|
||||
}
|
||||
cairo_matrix_translate(&m, xdiff, ydiff);
|
||||
}
|
||||
@ -834,9 +834,7 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
|
||||
{
|
||||
// draw complex text
|
||||
ServerFont& rFont = rLayout.GetServerFont();
|
||||
const bool bVertical = rFont.GetFontSelData().mbVertical;
|
||||
|
||||
if( !bVertical && isCairoRenderable(rFont) )
|
||||
if( isCairoRenderable(rFont) )
|
||||
DrawCairoAAFontString( rLayout );
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user