<div dir="ltr">Hi,<div><br></div><div>I just found that I didn't send to the list.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>寄件者: <strong class="gmail_sendername" dir="auto">Mark Hung</strong> <span dir="auto"><<a href="mailto:marklh9@gmail.com">marklh9@gmail.com</a>></span><br>Date: 2021年4月28日 週三 上午12:46<br>Subject: Re: Drawing vertical text glyphs<br>To: Luboš Luňák <<a href="mailto:l.lunak@collabora.com">l.lunak@collabora.com</a>><br></div><br><br><div dir="ltr">Hi Lubos,<br><br>Maybe it's after I commited 51b9042efea0, that<br>I started to feel that vertical writing just worked by coincidence.<br><br>I tried to start from what we get from Harfbuzz. In theory, if the<br>sample code with Cairo there works, then we can expect the correct result<br>in LibreOffice.<br><br>We rotate things at many places. I'd prefer to get rid of those rotations if possible.<div>For example in SalLayout::GetDrawPosition called by GenericSalLayout::GetNextGlyph <br><br>And underlying platform code rotate them again, like calling 

cairo_matrix_rotate 

<div>in CairoTextRender::DrawTextLayout.<div><br>I wonder where the center is when rotation is applied. <br>And how GetNextGlyph() returns a position that is unified among all the underlying text render API on all platforms.</div><div>Do all of them have the same offset from reference point to the origin of a glyph?</div><div><br><br>These are unanswered questions to myself.</div><div><br>Anyway, if you need someone to verify text layout results with vertical writing or<br>, don't hesitate to ask.<br><br>I can definitely help. I can also verify patches on Windows.<br>There is also a telegram group of TDF members from the CJK area if you prefer.<br><br><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Luboš Luňák <<a href="mailto:l.lunak@collabora.com" target="_blank">l.lunak@collabora.com</a>> 於 2021年4月26日 週一 下午6:30寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
 Hello,<br>
<br>
 is here somebody who understands drawing vertical (asian etc.) texts? I need <br>
help in that area for the Skia backend.<br>
<br>
 Specifically, the problems are tdf#137907, tdf#136081 and tdf#105650, which <br>
all stem from the same problem of positioning vertical glyphs. <br>
Positioning "normal" horizontal glyphs works fine, even in rotated text. I've <br>
looked at other VCL backends, and most of them handle vertical glyphs <br>
specially[*], and each of them in a different way. And the visual results are <br>
also different for those that I can check, and even that is different from <br>
what I can see if I check e.g. tdf#103785 in MS Office.<br>
<br>
 Given that I don't have that deep understanding of font rendering and I'm <br>
also not familiar with languages that need vertical glyphs, I have no idea <br>
what the correct way to do this should be. Is there somebody who understands <br>
this and could help me (preferably with knowledge of how it works, but even <br>
just being able to visually tell what's correct could do).<br>
<br>
[*] AquaSalGraphics::DrawTextLayout(), CairoTextRender::DrawTextLayout(), <br>
PrinterGfx::DrawGlyph(), ExTextOutRenderer::operator() , make your pick<br>
<br>
-- <br>
 Luboš Luňák<br>
 <a href="mailto:l.lunak@collabora.com" target="_blank">l.lunak@collabora.com</a><br>
_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org" target="_blank">LibreOffice@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/libreoffice" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Mark Hung<br></div></div></div>
</div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Mark Hung<br></div></div></div></div></div>