commit | 326e11b2bedfdbb2f92766c01bfca34d3661aad7 | [log] [tgz] |
---|---|---|
author | Etienne Bergeron <etienneb@chromium.org> | Thu May 23 23:29:21 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu May 23 23:29:21 2019 |
tree | 268b000db43bb284356a3c5442c0ca3859d7ae62 | |
parent | d9af410f2ad21c4902af169b871c9119ef051529 [diff] |
Implement the GetFontList using DWrite instead of GDI API. This CL is modifying the font-settings API on Windows. The goal of this CL is to remove the gfx::PlatformFontWin::GetLocalizedFontName(...) calls since the gfx::PlatformFontWin will be replaced by gfx::PlatformFontSkia. The GDI API was listing the system fonts by using the system locale which means the font-name was the localized name. The DWrite API allows the caller to specify the locale and is not forced to be the system one. The font-settings API is shipping a list of pair of string to extensions when the GetList is called (e.g fontId and displayName). The fontId is used as an identifier for other font-settings API. The DisplayName is the name that is displayed to the user. On windows, both string were used to be the Localized name since the GDI API was returning the localized name. A extra conversion was needed when an other windows API returns a non-localized name to be sure it will be the same FontID. By enforcing fontId to be non-localized, these extra conversion are now useless. And only the displayName is localized. Bug: 944227 Change-Id: Iab1bff832504fbf9abc8860ece31357148c01cee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1606661 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Reviewed-by: Etienne Bergeron <etienneb@chromium.org> Reviewed-by: Robert Liao <robliao@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#662886}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .