<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>240279</bug_id>
          
          <creation_ts>2022-05-10 08:38:43 -0700</creation_ts>
          <short_desc>Traditional Mongolian script characters incorrectly oriented</short_desc>
          <delta_ts>2023-12-22 10:28:31 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=112488</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="r12a">ishida</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>fantasai.bugs</cc>
    
    <cc>ishida</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>xidorn-webkit</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1867936</commentid>
    <comment_count>0</comment_count>
    <who name="r12a">ishida</who>
    <bug_when>2022-05-10 08:38:43 -0700</bug_when>
    <thetext>Lines of text in the Traditional Mongolian script run vertically from top to bottom of the page. Lines flow from left to right. The script is cursive, meaning that the characters join along the vertical centre line. Here is an example:

https://user-images.githubusercontent.com/4839211/167632640-cb805b08-59a1-4c73-a28f-b47f7048f153.png

Note the orientation of the glyphs.


Specs:
css-writing-modes-4 provides the writing-modes property. The vertical-lr value is designed to display Traditional Mongolian text as expected.


Tests &amp; results:
i18n test suite, Vertical text, Vertical-LR, Glyphs (https://w3c.github.io/i18n-tests/results/writing-mode-vertical#lr_glyphs)

Results

    Gecko: ✅ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0

    Blink: ✅ Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

    WebKit: ❌ Rotates lines appropriately, but doesn&apos;t display characters in the correct orientation and doesn&apos;t join them up (see the left-hand line below). Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15

    https://user-images.githubusercontent.com/4839211/105961907-09663500-6077-11eb-9034-13afb495de68.png

    To get this to work in WebKit you need to add text-orientation: sideways to the CSS, which should not be necessary, and is not needed for Gecko and Blink browsers.


This issue is being tracked by the W3C at https://w3c.github.io/mlreq/gap-analysis/#issue39_vertical_text

Another (long) bug was raised in 2013 and ground to a halt in 2014 (8 years ago!).  I&apos;m starting a new bug because i want to just focus on making Mongolian look correct and getting WebKit to be interoperable with other browsers from a content author perspective. (See https://bugs.webkit.org/show_bug.cgi?id=112488)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1867962</commentid>
    <comment_count>1</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2022-05-10 10:10:16 -0700</bug_when>
    <thetext>This has the same root cause as https://bugs.webkit.org/show_bug.cgi?id=212128</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869694</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-17 08:39:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/93426525&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879500</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-06-30 13:29:59 -0700</bug_when>
    <thetext>Marking as Dupe of Bug 212128 to match Radar state.

*** This bug has been marked as a duplicate of bug 212128 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879690</commentid>
    <comment_count>4</comment_count>
    <who name="r12a">ishida</who>
    <bug_when>2022-07-01 01:42:14 -0700</bug_when>
    <thetext>I had checked bug 212128 before raising this, and concluded that bug 212128 may involve a fix for a small problem that is not necessarily the fix needed for this much more generalised problem. Certainly, for CJK, rotation of punctuation is handled independently from correctly rotating ordinary text. It may be that Mongolian is a special case, but then i still think that bug 212128 should be rather classed as superceded by this issue, and some text should be added to the bug report to indicate that this is a much bigger problem than just fixing parentheses and brackets.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880896</commentid>
    <comment_count>5</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2022-07-05 21:38:21 -0700</bug_when>
    <thetext>I think we would probably fix all of these bugs in a single patch (or single patch series).

Under the assumption that we probably only need a single bug to track these incorrectly rotated characters, do you think we should reverse the duping relationship and dup that bug to this one instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880897</commentid>
    <comment_count>6</comment_count>
    <who name="r12a">ishida</who>
    <bug_when>2022-07-05 21:41:05 -0700</bug_when>
    <thetext>Yeah, that&apos;s what i was thinking, since it seems to be a superset that includes the other bug.  I agree that it would seem to make sense to fix all in a single patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880910</commentid>
    <comment_count>7</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2022-07-05 23:16:07 -0700</bug_when>
    <thetext>Reversing dup direction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880912</commentid>
    <comment_count>8</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2022-07-05 23:16:39 -0700</bug_when>
    <thetext>*** Bug 212128 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990283</commentid>
    <comment_count>9</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-06 13:48:40 -0800</bug_when>
    <thetext>Blink merge: https://chromium.googlesource.com/chromium/blink/+/e3ba3532accd84e6a0253705595b97556ae7ca67

In my local testing by adding above in WebKit, it progress both test cases mentioned in Comment 0 and also one of WPT:

https://wpt.fyi/results/css/css-writing-modes/mongolian-orientation-002.html?label=master&amp;label=experimental&amp;aligned&amp;q=Mongolian</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990284</commentid>
    <comment_count>10</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-06 13:49:45 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #9)
&gt; Blink merge:
&gt; https://chromium.googlesource.com/chromium/blink/+/
&gt; e3ba3532accd84e6a0253705595b97556ae7ca67
&gt; 
&gt; In my local testing by adding above in WebKit, it progress both test cases
&gt; mentioned in Comment 0 and also one of WPT:
&gt; 
&gt; https://wpt.fyi/results/css/css-writing-modes/mongolian-orientation-002.
&gt; html?label=master&amp;label=experimental&amp;aligned&amp;q=Mongolian

WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/FontCascadeFonts.cpp#224

Line 235 &amp; Line 270.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990286</commentid>
    <comment_count>11</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-06 13:52:03 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #10)
&gt; (In reply to Ahmad Saleem from comment #9)
&gt; &gt; Blink merge:
&gt; &gt; https://chromium.googlesource.com/chromium/blink/+/
&gt; &gt; e3ba3532accd84e6a0253705595b97556ae7ca67
&gt; &gt; 
&gt; &gt; In my local testing by adding above in WebKit, it progress both test cases
&gt; &gt; mentioned in Comment 0 and also one of WPT:
&gt; &gt; 
&gt; &gt; https://wpt.fyi/results/css/css-writing-modes/mongolian-orientation-002.
&gt; &gt; html?label=master&amp;label=experimental&amp;aligned&amp;q=Mongolian
&gt; 
&gt; WebKit Source:
&gt; https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/
&gt; FontCascadeFonts.cpp#224
&gt; 
&gt; Line 235 &amp; Line 270.

Note - it fixes this as well from other bug: http://www.mongolfont.com/test/webkit/div.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990997</commentid>
    <comment_count>12</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-08 16:16:10 -0800</bug_when>
    <thetext>Attempt PR - https://github.com/WebKit/WebKit/pull/20195</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2001609</commentid>
    <comment_count>13</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-12-22 10:28:28 -0800</bug_when>
    <thetext>Committed 272454@main (6c53862898c9): &lt;https://commits.webkit.org/272454@main&gt;

Reviewed commits have been landed. Closing PR #22186 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>