Description: When Skia is enabled in vertical writing, changing the width in the font scale modifies the font size. Steps to Reproduce: Configutation: * Open Tools -> Options * LibreOffice -> View: [Use Skia for all rendering] is on. * Language Settings -> Languages: * Asia: Default - Japanese Page Style: * Open Format -> Page Style... * [Page] Tab: Text Direction: Right-to-Left(Vertical1. ) 1. Select a characters. 2. Right click, Select Character -> Character... from context menu. 3. [Position] Tab, Set [Scale Width] to 70% of 140%. Actual Results: Font size has changed. Expected Results: Font width has changed. Reproducible: Always User Profile Reset: Yes OpenGL enabled: Yes Additional Info: Version: 7.0.0.3 (x64) Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e CPU threads: 2; OS:Windows 10.0 Build 19041; UI render: default; VCL: win Locale: ja-JP (ja_JP); UI: ja-JP Calc: threaded
Created attachment 164642 [details] Vertical writing, Skia enabled and scale width changed
Created attachment 164643 [details] Vertical writing, Skia disabled and scale width changed
Created attachment 164644 [details] Test odt file
Reproduced using the test file in comment #3. Version: 7.0.0.3 (x64) Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e CPU 线程: 2; 操作系统: Windows 10.0 Build 18363; 界面渲染: Skia/点阵; VCL: win Locale: zh-CN (zh_CN); 界面: zh-CN Calc: threaded Also happens for Chinese vertical text using similar steps on a new blank file.
What exactly am I supposed to see? I don't know how read the text, and it's not even the same text for the 3 different sizes, so I don't know what to compare. Are either or both of these following screenshots correct?
Created attachment 164723 [details] dwrite possible fix
Created attachment 164724 [details] gdi possible fix
(In reply to Luboš Luňák from comment #5) > What exactly am I supposed to see? I don't know how read the text, and it's > not even the same text for the 3 different sizes, so I don't know what to > compare. > Are either or both of these following screenshots correct? Alas, I thought the difference is obvious to non-CJK users. Sorry for not explaining it better. The usual Kanji/Hanzi character is a square-shaped glyph, i.e., the height and width is the same. And in the example file, when the "width" (in vertical text, it refers to the vertical dimension) is scaled, the "height" (horizontal dimension for vertical text) stays the same, and the characters are no longer square-shaped, but looks like a rectangle. So the expected behavior is: for 70% scaling, the vertical "width" is smaller than the horizontal "height", and the characters are "short and wide" rectangles; while for 140% scaling, the "width" is larger than "height", and the characters are "tall and slim" rectangles. Of course, for 100% scaling, the characters are squares. This is what's shown in attachment 164643 [details]. The actual behavior, which we consider buggy, is that characters are shown as squares in all three scalings. It is as if the scaling in vertical "width" is also applied to the horizontal "height". This is what's shown in attachment 164642 [details]. In your two screenshots characters are all squares, so neither of them is correct.
Created attachment 164870 [details] Font scale correct and incorrect
(In reply to Luboš Luňák from comment #5) > What exactly am I supposed to see? I don't know how read the text, and it's > not even the same text for the 3 different sizes, so I don't know what to > compare. > Are either or both of these following screenshots correct? I made a picture of the correct and incorrect font scale. Please see the attached image. * https://bugs.documentfoundation.org/attachment.cgi?id=164870
(In reply to nogajun from comment #10) > I made a picture of the correct and incorrect font scale. Please see the > attached image. > > * https://bugs.documentfoundation.org/attachment.cgi?id=164870 The "Good" 140% sample in this image is distorted compared to what it should look like alongside the 100% one, right? It should be the same width, and taller, while in the sample it is the same height, and narrower. At least when I look at the test document without Skia rendering, or in the second attached screenshot, it seems to be the same width, and only the height changes (which corresponds to Ming Hua's explanation from comment 8).
Still reproducible in 7.1.0 Beta1: Good (non-square characters for 70% and 140% scales) in: Version: 7.1.0.0.beta1 (x64) Build ID: 828a45a14a0b954e0e539f5a9a10ca31c81d8f53 CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: zh-CN (zh_CN); UI: zh-CN Calc: threaded ... and bad (all square characters) in: Version: 7.1.0.0.beta1 (x64) Build ID: 828a45a14a0b954e0e539f5a9a10ca31c81d8f53 CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: zh-CN (zh_CN); UI: zh-CN Calc: threaded
Created attachment 171783 [details] vertical writing with 300% scaling in width I made another test file. It contains two lines in vertical writing, one without scaling (100%) and the other with scaling (300%) for comparison. With 7.1.2.2 and current master build, the font did scale 300% in width, just too much space padded between characters. Version: 7.1.2.2 (x64) / LibreOffice Community Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4 CPU threads: 16; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: zh-TW (zh_TW); UI: zh-TW Calc: CL
Created attachment 171784 [details] With https://gerrit.libreoffice.org/c/core/+/115246 The attached image shows what appears with the attachment #171783 [details] and the fix below: https://gerrit.libreoffice.org/c/core/+/115246
(In reply to Mark Hung from comment #14) Great! But it need to fix a some more. I've attached screenshots. (7.1-without-skia.png and 7.2-with-skia.png) * SKIA version is biginning of line are not aligned. 70% is moved above 100%. 140% is moved below 100%. * SKIA version is spacing between the characters has changed. 70% overlaps the character above it. 140% moves the characters apart.
Created attachment 171998 [details] 7.1 without SKIA Screenshot (Good version)
Created attachment 171999 [details] patched 7.2 with SKIA Screenshot
Luboš Luňák committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d3772e26c077686fc5ca0a8ba526df7d104ada5c fix font scale width handling for Skia/X11 (tdf#136081) It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This should be fixed for 7.2+. As the fixes depend on other changes that are non-trivial and will not be backported to 7.1, this issue can be worked around by disabling Skia for 7.1 until 7.2 is released.
Confirmed with sample file in comment #3 and 7.2.0 Beta1 on Windows 10: Version: 7.2.0.0.beta1 (x64) / LibreOffice Community Build ID: c6974f7afec4cd5195617ae48c6ef9aacfe85ddd CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: zh-CN (zh_CN); UI: zh-CN Calc: threaded The 70% and 140% scaling paragraphs now correctly have non-square shaped characters. Thanks Luboš!
(In reply to Ming Hua from comment #20) > Thanks Luboš! And of course thanks to Mark as well!