diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-05-12 17:59:50 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-05-12 18:47:36 +0200 |
commit | 2ede6c95e6481c92cc199e7d74fd36c841636304 (patch) | |
tree | 1c1544bac538b7f6531521a2c5521bcc0c0ed247 | |
parent | bc0e857b9699bfefa2d8204fe627063675c9cfc9 (diff) |
Some logging
Change-Id: I4515d4d6760e22ce4d77fbb3cbce93e3ce097b98
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index 55ddaee28931..07f9f76d6324 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -203,6 +203,21 @@ static bool needNextCode(sal_Unicode cChar) return lcl_CharIsJoiner(cChar) || U16_IS_TRAIL(cChar); } +std::ostream &operator <<(std::ostream& s, ServerFont* pFont) +{ +#ifndef SAL_LOG_INFO + (void) pFont; +#else + FT_Face aFace = pFont->GetFtFace(); + const char* pName = FT_Get_Postscript_Name(aFace); + if (pName) + s << pName; + else + s << pFont->GetFontFileName(); +#endif + return s; +} + static hb_blob_t *getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData) { char pTagName[5]; @@ -213,6 +228,9 @@ static hb_blob_t *getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU pTagName[4] = 0; ServerFont* pFont = (ServerFont*) pUserData; + + SAL_INFO("vcl.harfbuzz.layout", "getFontTable(" << pFont << ", " << pTagName << ")"); + sal_uLong nLength; const unsigned char* pBuffer = pFont->GetTable(pTagName, &nLength); @@ -284,6 +302,8 @@ static hb_position_t getGlyphKerningH(hb_font_t* /*font*/, void* pFontData, ServerFont* pFont = (ServerFont*) pFontData; FT_Face aFace = pFont->GetFtFace(); + SAL_INFO("vcl.harfbuzz.layout", "getGlyphKerningH(" << pFont << ", " << nGlyphIndex1 << ", " << nGlyphIndex2 << ")"); + FT_Error error; FT_Vector kerning; hb_position_t ret; @@ -312,8 +332,10 @@ static hb_bool_t getGlyphExtents(hb_font_t* /*font*/, void* pFontData, { ServerFont* pFont = (ServerFont*) pFontData; FT_Face aFace = pFont->GetFtFace(); - FT_Error error; + SAL_INFO("vcl.harfbuzz.layout", "getGlyphExtents(" << pFont << ", " << nGlyphIndex << ")"); + + FT_Error error; error = FT_Load_Glyph(aFace, nGlyphIndex, FT_LOAD_DEFAULT); if (!error) { @@ -331,11 +353,13 @@ static hb_bool_t getGlyphContourPoint(hb_font_t* /*font*/, void* pFontData, hb_position_t *x, hb_position_t *y, void* /*pUserData*/) { + bool ret = false; ServerFont* pFont = (ServerFont*) pFontData; FT_Face aFace = pFont->GetFtFace(); - FT_Error error; - bool ret = false; + SAL_INFO("vcl.harfbuzz.layout", "getGlyphContourPoint(" << pFont << ", " << nGlyphIndex << ", " << nPointIndex << ")"); + + FT_Error error; error = FT_Load_Glyph(aFace, nGlyphIndex, FT_LOAD_DEFAULT); if (!error) { @@ -407,6 +431,8 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) ServerFont& rFont = rLayout.GetServerFont(); FT_Face aFtFace = rFont.GetFtFace(); + SAL_INFO("vcl.harfbuzz.layout", "layout(" << this << ",rArgs=" << rArgs << ")"); + hb_font_t *pHbFont = hb_font_create(mpHbFace); hb_font_set_funcs(pHbFont, getFontFuncs(), &rFont, NULL); hb_font_set_scale(pHbFont, |