summaryrefslogtreecommitdiffstats
path: root/gfx/font.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move src/gfx/ to src/ui/gfxsail@chromium.org2011-02-021-85/+0
| | | | | | | | | | | To reduce the size of this change I've left stub header files in src/gfx/. Once all includes have been updated I'll delete the stub files. BUG=71063 TEST=Still doing test builds. Review URL: http://codereview.chromium.org/6246027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73530 0039d316-1c4b-4281-b951-d872f2087c98
* linux: Make PlatformFontGtk deal only in pixels.derat@chromium.org2011-01-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gfx::Font deals with pixels (at least, its GetFontSize() method is documented as returning them and that's what all of the metrics-related methods return; I'm assuming that the |font_size| argument in its constructors deals with the same units). PlatformFontGtk's constructor treated |font_size| as points, though, and mostly used points internally. This change makes PlatformFontGtk use pixels internally and renames all of the variables to describe their units. It also changes the size of the omnibox suggestion text: - on Chrome OS, it matches the size of the omnibox text - on Linux, it's slightly smaller (similar to Windows) It also makes us update the suggestion text size when switching between standard and GTK+ themes (the omnibox itself already handled this correctly). Tested with the following configurations in a regular GTK+ build: 120 DPI, GTK+ theme: - 13-pixel tab text - 16-pixel omnibox text - 13-pixel omnibox popup text - 16-pixel popup location text 96 DPI, GTK+ theme: - 13-pixel tab text - 13-pixel omnibox popup text - 12-pixel omnibox popup text - 13-pixel popup location text 72 DPI, GTK+ theme: - 13-pixel tab text - 9-pixel omnibox popup text - 9-pixel omnibox popup text - 9-pixel popup location text 120 DPI, Classic theme: - 13-pixel tab text - 13-pixel omnibox text - 12-pixel omnibox popup text - 10-pixel popup location text 96 DPI, Classic theme: - 13-pixel tab text - 13-pixel omnibox text - 12-pixel omnibox popup text - 10-pixel popup location text 72 DPI, Classic theme: - 13-pixel tab text - 13-pixel omnibox text - 12-pixel omnibox popup text - 10-pixel popup location text Put more simply: - Regular themes use hardcoded font sizes. - The GTK+ theme uses a hardcoded font size for tabs and sizes based on the DPI for the omnibox. BUG=61433,26354,chromium-os:8658 TEST=see above. also took screenshots and checked that the onscreen font size matches that passed to gfx::Font and that the computed metrics are correct, and built a Chrome OS image to verify that things look reasonable, and verified that text isn't clipped on the "Aw, Snap!" page Review URL: http://codereview.chromium.org/6378007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72985 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71169 - Revert 71167 - Remove wstring from gfx.avi@chromium.org2011-01-121-2/+2
| | | | | | | | | | | | | | | BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6134010 TBR=joi@chromium.org Review URL: http://codereview.chromium.org/6130008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71176 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71167 - Remove wstring from gfx.joi@chromium.org2011-01-121-2/+2
| | | | | | | | | | | | BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6134010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71169 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from gfx.avi@chromium.org2011-01-121-2/+2
| | | | | | | | | BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71167 0039d316-1c4b-4281-b951-d872f2087c98
* Change Font.GetStringWidth() to take string16 instead of wstring.estade@chromium.org2011-01-041-2/+2
| | | | | | | | | | | do a bunch of string fixes along the way. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/5985007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70440 0039d316-1c4b-4281-b951-d872f2087c98
* A small wstring -> string16 cleanup in PlatformFont.tony@chromium.org2010-12-101-1/+2
| | | | | | | | BUG=23581 Review URL: http://codereview.chromium.org/5794001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68908 0039d316-1c4b-4281-b951-d872f2087c98
* Rework gfx::Font by moving platform-specific code into inner classes.ben@chromium.org2010-08-131-0/+85
gfx::Font is a platform-neutral API shim that exists as a wrapper object to allow for the creation and lifetime of gfx::Font objects to remain consistent with past usage. gfx::PlatformFont is an interface implemented by the platform-specific inner classes (gfx::PlatformFontWin,Mac,Gtk). BUG=none TEST=existing unittests Review URL: http://codereview.chromium.org/3083022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56040 0039d316-1c4b-4281-b951-d872f2087c98