[Libreoffice-bugs] [Bug 115321] Vertical Japanese text lines with emphasis mark above in odt exported to PDF is shown a quarter font height lower than the normal lines , and no emphasis mark is shown
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Feb 22 00:22:40 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=115321
--- Comment #4 from himajin100000 at gmail.com ---
recently, I was trying printf debugging, after reading
https://wiki.documentfoundation.org/Development/How_to_debug#Macros_Controlling_Debug_Code
to the following code,
https://opengrok.libreoffice.org/xref/core/sw/source/core/text/itrtxt.cxx?r=f55a9b77#280
I add some lines of code. (I'm too lazy to learn how to use diff command line.)
==================================
if( GetInfo().GetTextFrame()->IsVertLR() ){
nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent;
}else{
SAL_INFO("vcl",nOfst);
nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
SAL_INFO("vcl",rLine.Height());
SAL_INFO("vcl",nPorHeight);
SAL_INFO("vcl",nPorAscent);
SAL_INFO("vcl",nOfst);
}
break;
==================================
When the line is WITHOUT emphasis mark, the result was:
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:287: 0
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:289: 401
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:290: 401
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:291: 346
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:292: 346
while WITH emphasis mark on all characters in a line
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:287: 0
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:289: 499
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:290: 499
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:291: 444
info:vcl:9980:5152:sw/source/core/text/itrtxt.cxx:292: 444
===================================
for the following code
https://opengrok.libreoffice.org/xref/core/sw/source/core/text/itrpaint.cxx?r=180f2860#303
I tried
if ( bAdjustBaseLine ){
GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *m_pCurr, pPor ) );
SAL_INFO("vcl",GetInfo().Y());
if ( pPor->Width() && pPor->InTextGrp() )
pEndTempl = pPor;
}
}
WITHOUT emphasis mark: 630
WITH emphasis mark: 728.
========================
additional note to my previous post(just to make sure):
I used IPA fonts downloadable from
https://ipafont.ipa.go.jp/old/ipaexfont/download.html for the attachments.
Values here may not be the same when different fonts (with different metrics)
are used.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180222/e589b732/attachment.html>
More information about the Libreoffice-bugs
mailing list