Fwd: Drawing vertical text glyphs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I just found that I didn't send to the list.

---------- Forwarded message ---------
寄件者: Mark Hung <marklh9@xxxxxxxxx>
Date: 2021年4月28日 週三 上午12:46
Subject: Re: Drawing vertical text glyphs
To: Luboš Luňák <l.lunak@xxxxxxxxxxxxx>


Hi Lubos,

Maybe it's after I commited 51b9042efea0, that
I started to feel that vertical writing just worked by coincidence.

I tried to start from what we get from Harfbuzz. In theory, if the
sample code with Cairo there works, then we can expect the correct result
in LibreOffice.

We rotate things at many places. I'd prefer to get rid of those rotations if possible.
For example in SalLayout::GetDrawPosition called by GenericSalLayout::GetNextGlyph

And underlying platform code rotate them again, like calling  cairo_matrix_rotate
in CairoTextRender::DrawTextLayout.

I wonder where the center is when rotation is applied.
And how GetNextGlyph() returns a position that is unified among all the underlying text render API on all platforms.
Do all of them have the same offset from reference point to the origin of a glyph?


These are unanswered questions to myself.

Anyway, if you need someone to verify text layout results with vertical writing or
, don't hesitate to ask.

I can definitely help. I can also verify patches on Windows.
There is also a telegram group of TDF members from the CJK area if you prefer.



Luboš Luňák <l.lunak@xxxxxxxxxxxxx> 於 2021年4月26日 週一 下午6:30寫道:

 Hello,

 is here somebody who understands drawing vertical (asian etc.) texts? I need
help in that area for the Skia backend.

 Specifically, the problems are tdf#137907, tdf#136081 and tdf#105650, which
all stem from the same problem of positioning vertical glyphs.
Positioning "normal" horizontal glyphs works fine, even in rotated text. I've
looked at other VCL backends, and most of them handle vertical glyphs
specially[*], and each of them in a different way. And the visual results are
also different for those that I can check, and even that is different from
what I can see if I check e.g. tdf#103785 in MS Office.

 Given that I don't have that deep understanding of font rendering and I'm
also not familiar with languages that need vertical glyphs, I have no idea
what the correct way to do this should be. Is there somebody who understands
this and could help me (preferably with knowledge of how it works, but even
just being able to visually tell what's correct could do).

[*] AquaSalGraphics::DrawTextLayout(), CairoTextRender::DrawTextLayout(),
PrinterGfx::DrawGlyph(), ExTextOutRenderer::operator() , make your pick

--
 Luboš Luňák
 l.lunak@xxxxxxxxxxxxx
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice


--
Mark Hung


--
Mark Hung
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux