WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170399
REGRESSION (
r211382
): Arabic text of non-system font cannot be justified
https://bugs.webkit.org/show_bug.cgi?id=170399
Summary
REGRESSION (r211382): Arabic text of non-system font cannot be justified
mohammedmadina
Reported
2017-04-03 05:30:22 PDT
Created
attachment 306073
[details]
A blog post showing the justification bug in Arabic text. Arabic text of non-system fonts cannot be justified correctly after the iOS 10.3 update. The bug results in unreadable text in most websites that use outer fonts.
Attachments
A blog post showing the justification bug in Arabic text.
(498.02 KB, image/png)
2017-04-03 05:30 PDT
,
mohammedmadina
no flags
Details
Patch
(10.84 KB, patch)
2017-04-06 22:55 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(11.05 KB, patch)
2017-04-07 12:47 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-04-04 16:58:15 PDT
<
rdar://problem/31442008
>
Myles C. Maxfield
Comment 2
2017-04-06 22:54:42 PDT
***
Bug 170586
has been marked as a duplicate of this bug. ***
Myles C. Maxfield
Comment 3
2017-04-06 22:55:35 PDT
Created
attachment 306470
[details]
Patch
Simon Fraser (smfr)
Comment 4
2017-04-06 23:11:28 PDT
Comment on
attachment 306470
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
> Source/WebCore/ChangeLog:14 > + When we perform justification, we adjust glyphs' advances to add extra space between words. > + ComplexTextController maintains an invariant where m_totalWidth is equal to the sum of these > + advances. However, in RTL text, inserting extra justification space to the left of a glyph > + would break that invariant, and would increase the advances of two glyphs instead of just > + one. Then, when we go to draw the text, the sum of the advances is wider than m_totalWidth, > + which means the glyphs would be drawn outside of their container.
When did this regress and why?
> Source/WebCore/ChangeLog:16 > + Test: ComplexTextControllerTest.TotalWidthWithJustification
Should we not also have layout tests?
Myles C. Maxfield
Comment 5
2017-04-06 23:20:00 PDT
Comment on
attachment 306470
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
>> Source/WebCore/ChangeLog:14 >> + which means the glyphs would be drawn outside of their container. > > When did this regress and why?
r211382
, because there were no tests for it.
>> Source/WebCore/ChangeLog:16 >> + Test: ComplexTextControllerTest.TotalWidthWithJustification > > Should we not also have layout tests?
I think the API test is sufficient. Creating a layout test requires making a new font, but the API test doesn't require that.
Simon Fraser (smfr)
Comment 6
2017-04-07 12:31:23 PDT
(In reply to Myles C. Maxfield from
comment #5
)
> Comment on
attachment 306470
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
> > >> Source/WebCore/ChangeLog:14 > >> + which means the glyphs would be drawn outside of their container. > > > > When did this regress and why? > >
r211382
, because there were no tests for it.
Please update the changelog with this info.
Said Abou-Hallawa
Comment 7
2017-04-07 12:41:25 PDT
Comment on
attachment 306470
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
>>>> Source/WebCore/ChangeLog:14 >>>> + which means the glyphs would be drawn outside of their container. >>> >>> When did this regress and why? >> >>
r211382
, because there were no tests for it. > > Please update the changelog with this info.
When looking the attached picture
https://bug-170399-attachments.webkit.org/attachment.cgi?id=306073
, I see the Arabic text is justified by spaces. Should it be justified by Kashidas instead? Was this covered by this patch? Or is this what the css of the page selects to do? Also I saw text overlapping which happens with the English words Apple and RED. Will this fixed also by this patch?
Myles C. Maxfield
Comment 8
2017-04-07 12:46:51 PDT
(In reply to Said Abou-Hallawa from
comment #7
)
> Comment on
attachment 306470
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
> > >>>> Source/WebCore/ChangeLog:14 > >>>> + which means the glyphs would be drawn outside of their container. > >>> > >>> When did this regress and why? > >> > >>
r211382
, because there were no tests for it. > > > > Please update the changelog with this info. > > When looking the attached picture >
https://bug-170399-attachments.webkit.org/attachment.cgi?id=306073
, I see > the Arabic text is justified by spaces. Should it be justified by Kashidas > instead? Was this covered by this patch? Or is this what the css of the page > selects to do? > Also I saw text overlapping which happens with the English words Apple and > RED. Will this fixed also by this patch?
One day, yes, it would be great if we could justify using Kashidas. However, we currently have no concept of this. This patch is simply a bug fix.
Myles C. Maxfield
Comment 9
2017-04-07 12:47:36 PDT
Created
attachment 306529
[details]
Patch
WebKit Commit Bot
Comment 10
2017-04-07 14:38:00 PDT
Comment on
attachment 306529
[details]
Patch Clearing flags on attachment: 306529 Committed
r215117
: <
http://trac.webkit.org/changeset/215117
>
WebKit Commit Bot
Comment 11
2017-04-07 14:38:02 PDT
All reviewed patches have been landed. Closing bug.
Jon Lee
Comment 12
2017-04-09 23:30:34 PDT
(In reply to Myles C. Maxfield from
comment #8
)
> (In reply to Said Abou-Hallawa from
comment #7
) > > Comment on
attachment 306470
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
> > > > >>>> Source/WebCore/ChangeLog:14 > > >>>> + which means the glyphs would be drawn outside of their container. > > >>> > > >>> When did this regress and why? > > >> > > >>
r211382
, because there were no tests for it. > > > > > > Please update the changelog with this info. > > > > When looking the attached picture > >
https://bug-170399-attachments.webkit.org/attachment.cgi?id=306073
, I see > > the Arabic text is justified by spaces. Should it be justified by Kashidas > > instead? Was this covered by this patch? Or is this what the css of the page > > selects to do? > > Also I saw text overlapping which happens with the English words Apple and > > RED. Will this fixed also by this patch? > > One day, yes, it would be great if we could justify using Kashidas. However, > we currently have no concept of this. This patch is simply a bug fix.
Do we already have a bug for this enhancement?
Myles C. Maxfield
Comment 13
2017-04-10 08:13:32 PDT
(In reply to Jon Lee from
comment #12
)
> (In reply to Myles C. Maxfield from
comment #8
) > > (In reply to Said Abou-Hallawa from
comment #7
) > > > Comment on
attachment 306470
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=306470&action=review
> > > > > > >>>> Source/WebCore/ChangeLog:14 > > > >>>> + which means the glyphs would be drawn outside of their container. > > > >>> > > > >>> When did this regress and why? > > > >> > > > >>
r211382
, because there were no tests for it. > > > > > > > > Please update the changelog with this info. > > > > > > When looking the attached picture > > >
https://bug-170399-attachments.webkit.org/attachment.cgi?id=306073
, I see > > > the Arabic text is justified by spaces. Should it be justified by Kashidas > > > instead? Was this covered by this patch? Or is this what the css of the page > > > selects to do? > > > Also I saw text overlapping which happens with the English words Apple and > > > RED. Will this fixed also by this patch? > > > > One day, yes, it would be great if we could justify using Kashidas. However, > > we currently have no concept of this. This patch is simply a bug fix. > > Do we already have a bug for this enhancement?
I don't think so.
Jon Lee
Comment 14
2017-04-10 08:45:56 PDT
***
Bug 170654
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug