Discussion:
Issue 366983 in chromium: DirectWrite uses wrong font when referred font doesn't exist
(too old to reply)
c***@googlecode.com
2014-04-25 03:56:49 UTC
Permalink
Status: Unconfirmed
Owner: ----
Labels: Pri-2 Via-Wizard Type-Bug OS-Windows

New issue 366983 by znuffy: DirectWrite uses wrong font when referred font
doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/36.0.1951.5 Safari/537.36

Steps to reproduce the problem:
1. Enable DirectWrite
2. Install "Helvetica Black" (shouldn't have Helvetica installed, just
the "Black" variant)
3. Go to a website that refers "Helvetica" in their CSS
4. DirectWrite will render "Helvetica Black" instead of "Helvetica"

What is the expected behavior?
DirectWrite should NOT use the font "Helvetica Black" when the referred
font is "Helvetica".

What went wrong?
"Helvetica Black" will be used instead of "Helvetica" if the font doesn't
exist, breaking the layout.

Did this work before? No

Chrome version: 36.0.1951.5 Channel: dev
OS Version: 6.3
Flash Version: Shockwave Flash 13.0 r0

I have to mention that this quirk also appears under Internet Explorer 11,
so it's not unique to Chrome's DirectWrite feature, it's most likely tied
to Windows' API.

Chrome without DirectWrite enabled does NOT exhibit this issue!

Attachments:
2014-04-25_05-47-00.png 10.8 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-04-25 09:16:03 UTC
Permalink
Updates:
Cc: ***@chromium.org
Labels: Needs-Feedback

Comment #1 on issue 366983 by ***@chromium.org: DirectWrite uses
wrong font when referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

Could you please elaborate step 2 for further debugging of this issue. Also
it would be of great help if you can provide a sample HTML file for the
same.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-05-06 15:26:37 UTC
Permalink
Comment #9 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

GDI and DirectWrite differ in the way they organize the available font
families that are installed. For example, DirectWrite (and WPF and CSS)
list the "Arial" font family, and include "Arial Narrow" and "Arial Black"
in that bucket. You can choose those variants by varying the Weight, Style,
and Stretch that you request. "Arial Narrow" would be selected by asking
for the "Arial" family, and a Stretch value of "Condensed."

GDI, however, lists "Arial Narrow" and "Arial Black" separately. This is
the organization model that most software in Windows follows, starting with
Notepad and going all the way to Word. Once you've chosen the font family,
you use toggle buttons for Bold, Italics, Underline, and Strikeout. It's a
fairly simple model, and even more important is that it is well understood
and people are comfortable with it.
(from
http://blog.getpaint.net/2009/12/21/paintnet-v352-is-on-the-way-%E2%80%93-better-font-support-for-win7vista/)

I think Chrome with DW should use the next font in the list if the base
font (Helvitica in this case) is not found but a family member.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-01 04:37:03 UTC
Permalink
Updates:
Cc: ***@chromium.org

Comment #10 on issue 366983 by ***@chromium.org: DirectWrite uses
wrong font when referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

Tested this issue on Windows7 using: 36.0.1985.140 (Official Build 286641)

1. Enable direct write from chrome://flags
2. Opened helvetica-black-demo.html

1. Disable direct write from chrome://flags
2. Opened helvetica-black-demo.html

Not seen any difference. Please find the attached screenshot as reference.

@ znuffy: Is this working with disable directwrite?



Attachments:
366983.png 113 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-01 04:45:39 UTC
Permalink
Comment #11 on issue 366983 by znuffy: DirectWrite uses wrong font when
referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

This is still occuring on 38.0.2107.3 (Official Build 286688) dev-m.

In order to see the issue you have to have the "Helvetica Black" font
installed (see attached in the post above).

It looks like in the screenshot you attached, "Helvetica Black" is not
installed on your system (2nd row with DirectWrite OFF should be rendered
with Helvetica Black, not Webdings).




Attachments:
2014-08-01_07-40-54.png 22.5 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-01 04:46:49 UTC
Permalink
Comment #12 on issue 366983 by znuffy: DirectWrite uses wrong font when
referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

(wrong file attached in previous post)

Attachments:
2014-08-01_07-42-18.png 38.2 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-01 06:33:13 UTC
Permalink
Updates:
Status: Assigned
Owner: ***@chromium.org
Labels: -Type-Bug -Needs-Feedback Type-Bug-Regression M-36

Comment #13 on issue 366983 by ***@chromium.org: DirectWrite uses
wrong font when referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

Able to repro this issue on Windows7 using: 36.0.1985.140 (Official Build
286641)

This is regression issue, broken in M35:

Bisect:
http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&range=259979%3A260021
Suspect: r260015
@***@chromium.org: Could you please look into this issue. Feel free to
change the owner, if this is not your's.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-01 16:28:37 UTC
Permalink
Updates:
Status: Available
Owner: ---
Cc: ***@chromium.org ***@chromium.org ***@chromium.org
***@chromium.org

Comment #14 on issue 366983 by ***@chromium.org: DirectWrite uses wrong
font when referred font doesn't exist
http://code.google.com/p/chromium/issues/detail?id=366983

Do we want to do anything here? (Emil, Ben)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-28 15:31:01 UTC
Permalink
Updates:
Cc: ***@chromium.org

Comment #16 on issue 366983 by ***@chromium.org: DirectWrite uses
wrong font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

Issue 408488 has been merged into this issue.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-28 16:26:01 UTC
Permalink
Comment #18 on issue 366983 by ***@chromium.org: DirectWrite uses
wrong font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

eae: It seems to me that CSS and Android both do the same thing that Direct
Write do. Why fallback? On 408488 we were concluding that this behavior was
according to spec.

qv http://www.w3.org/TR/css3-fonts/#font-style-matching (I don't know if
there's a WHATWG equivalent?): 5.2.4 seems to say that the name is
controlling, and we take the closest weight from that name even if there's
a closer-weight match under a different name.

(FWIW, Skia doesn't exactly implement 5.2.4.c on all platforms, but that's
not the problem here.)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-28 16:35:01 UTC
Permalink
Comment #19 on issue 366983 by ***@chromium.org: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

tomhudson: Our current behavior is arguably more correct (and in accordance
to the spec) but not necessarily what the page author or user had in mind.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-29 10:32:15 UTC
Permalink
Comment #20 on issue 366983 by ***@semlab.nl: DirectWrite uses wrong font
when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

The specs also say that "Matching occurs in a well-defined order to ensure
that the results are as consistent as possible across user agents, given an
identical set of available fonts and rendering technology.". Clearly, from
the tests in comment #2, it has failed horribly in ensuring consistency.

I'd say the consistency goal behind the spec trumps the literal spec and
think that if someone specified multiple entries for font-family and
(explicitly or implicitly) specified a font-weight / font-style /
font-stretch, the first goal should be to match the desired styling instead
of matching a font that shares a common name, but makes the whole page look
(drastically) different from how the author designed it. After all, the
author indicated that he is oke with those other fonts being rendered, but
has no way to indicate if he is oke with a different styling.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-29 10:38:15 UTC
Permalink
Comment #21 on issue 366983 by ***@semlab.nl: DirectWrite uses wrong font
when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

The specs also say that "Matching occurs in a well-defined order to ensure
that the results are as consistent as possible across user agents, given an
identical set of available fonts and rendering technology.". Clearly, from
the tests in comment #2, it has failed horribly in ensuring consistency.
I'd say the consistency goal behind the spec trumps the literal spec.

I also think that if someone specified multiple entries for font-family and
(explicitly or implicitly) specified a font-weight / font-style /
font-stretch, the first goal should be to match the desired styling instead
of matching a font that shares a common name, but makes the whole page look
(drastically) different from how the author designed it. After all, the
author indicated that he is oke with those other fonts being rendered, but
has no way to indicate if he is oke with a different styling.

If you ask me, the specs should be revised to have a more desirable
matching algorithm and to clear the apparent confusion among browser
vendors on how to match fonts. Obviously, this would take a lot of time and
then the vendors still would need to implement it, with the possibility of
some getting it wrong again.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-29 10:39:15 UTC
Permalink
Comment #22 on issue 366983 by ***@semlab.nl: DirectWrite uses wrong font
when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

In the mean time, there is no denying that Chrome screws up anyway on the
second line in commment #2, no matter what you think about how the first
line should be rendered.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-08-29 16:02:19 UTC
Permalink
Comment #23 on issue 366983 by ***@chromium.org: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

Re 21: Note that the spec specifically says "given an identical set of
available fonts". The issue here is inconsistency between systems with a
_different_ set of fonts. If both systems have the normal weight Helvetica
installed it will render identically. If both systems only have the black
weight Helvetica it will also render identically. The inconsistency arises
from systems with a different set of available fonts.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-10-03 05:48:37 UTC
Permalink
Comment #28 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

I believe this may be relate to Issue 417338 and Issue 408393.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-10-07 11:22:15 UTC
Permalink
Comment #29 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

A better decision making method would be to look for a matched font of the
same weight (ie: if no weight specified, look for standard weight) and if
no font of the correct weight is available, use fallback fonts.
Another good example of this behaviour is on windows x64 with DirectWrite
enabled on theoatmeal.com. H1,H2,H3,H4 fonts are defined in the css
as 'Gill Sans','Georgia','Palatino','Helvetica',serif with font-weight:
normal. On my Windows system, the only fonts matching 'Gill Sans' are 'Gill
Sans Condensed Ultra Bold' and 'Gill Sans Ultra Bold', both of which are
not the correct weight. The normal weight font is called 'Gill Sans MT'
which does not match 'Gill Sans' as defined in the css so headings on
theoatmeal.com are rendered in 'Gill Sans Ultrabold'.
Internet Explorer 11 renders headings in the fallback font Georgia.

Attachments:
fontrendering.png 54.0 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-09-06 17:05:27 UTC
Permalink
Comment #24 on issue 366983 by ***@gmail.com: DirectWrite uses
wrong font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

IMHO, I don't think that rendering a font with a different weight than
originally intended would be good experience for the user: AFAIK, Bold and
Italic fonts are generally used to give a "special" meaning for a piece of
text.

Anyway, I found an quite interesting complaint from a user that is having
this same issue:
His facebook is getting rendered Bold (with Helvetica Black), but he has
BOTH Helvetica and Helvetica Black installed. Looks like just Chrome, for
whatever reason, isn't detecting the normal Helvetica. Considering what he
said, I think he really would prefer having a fallback to a different font
with the same weight than to a version of the same font but with a
different weight.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-09-07 15:36:40 UTC
Permalink
Comment #25 on issue 366983 by ***@chromium.org: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

Re #24 charles.costar:
That sounds like bug 408393.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-09-10 16:24:28 UTC
Permalink
Comment #26 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

I have the same issue except I have a file called "Helvetica Ultra
Compressed". Needed for a project at work. When I noticed that Chrome v37
updated, almost EVERY website on the web became unreadable. This was not an
issue in Chrome v36 So I am guessing this is when DirectWrite made it into
Prime Time.

I need to blacklist Chrome from thinking Helvetica Ultra Compressed is
Helvetica. There is NO WAY it should ever been used on the web unless
someone puts "Helvetica Ultra Compressed" in their CSS. Which if you have
ever seen the font, anyone would ever do.

I had tried the whole "delete the font off the system" but due to the
system locking it, I had to go into safemode of win8 (not a nice
experience, since it takes like 15 minutes), delete it, and then start
windows.. Just to be told 20 minutes later that I need to do another change
to a project, so I had to install the font again.. And now the cycle
repeats. I've tried some CSS hack which tells Helvetica to load Arial, but
apparently this does not work in v37 due to DirectWrite, also tried some
chrome extensions, but again, directWrite seems to take priority over the
extensions and still uses the wrong Helvetica.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-10-09 10:58:21 UTC
Permalink
Comment #30 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

Facebook fonts broken since Chrome 38. Used to work fine.

Attachments:
delme.png 78.9 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2015-01-02 17:43:59 UTC
Permalink
Comment #31 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

I'd like to add that if a user has a font installed on their computer and
has DirectWrite enabled, Chrome will not fall back on a web font like it
used to for weights that aren't installed.

That is, if I have installed Roboto on my computer and include the Google
Web Font, those weights that I do not have installed will not display.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2015-01-26 22:21:52 UTC
Permalink
Comment #32 on issue 366983 by ***@gmail.com: DirectWrite uses wrong
font when referred font doesn't exist
https://code.google.com/p/chromium/issues/detail?id=366983

Was this fixed in https://codereview.chromium.org/542603004?
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
Continue reading on narkive:
Loading...