summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_harfbuzz.h
Commit message (Collapse)AuthorAgeFilesLines
* MacViews: Use RenderTextHarfBuzz only for Textfieldsandresantoso2014-12-091-0/+1
| | | | | | | | | | | Using RenderTextHarfBuzz for string sizing and eliding on Mac is problematic because it may not match when drawn by Cocoa, so we use RenderTextMac. But RenderTextMac does not have support for editing that is needed by views::Textfield, so use RenderTextHarfBuzz for MacViews textfields. Review URL: https://codereview.chromium.org/779793006 Cr-Commit-Position: refs/heads/master@{#307396}
* Enable subpixel positioning for UIckocagil2014-12-021-3/+9
| | | | | | | | | BUG=389649,434860,434843 R=ananta,msw,derat,jam,eae,sky Review URL: https://codereview.chromium.org/738363002 Cr-Commit-Position: refs/heads/master@{#306346}
* RenderTextHarfBuzz: Try fallback fonts of the Uniscribe font while shapingckocagil2014-10-291-0/+1
| | | | | | | | | | | This CL also fixes a Linux issue where a fallback font could be skipped. BUG=426052 R=msw Review URL: https://codereview.chromium.org/674233003 Cr-Commit-Position: refs/heads/master@{#301920}
* Avoid extra FontRenderParams queries in RenderTextHarfBuzz.derat2014-10-241-1/+15
| | | | | | | | | | | | gfx::Font already contains a FontRenderParams struct. Make RenderTextHarfBuzz use it when possible instead of always querying for a new struct. BUG=none Review URL: https://codereview.chromium.org/674683003 Cr-Commit-Position: refs/heads/master@{#301101}
* Standardize usage of virtual/override/final in ui/dcheng2014-10-211-16/+16
| | | | | | | | | | | | This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/667923002 Cr-Commit-Position: refs/heads/master@{#300446}
* replace OVERRIDE and FINAL with override and final in ui/mostynb2014-10-091-15/+15
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/623293004 Cr-Commit-Position: refs/heads/master@{#298839}
* Re-land: RenderTextHarfBuzz: Set font render parameters in font data functionsckocagil2014-08-251-0/+1
| | | | | | | | | | | | | | | Originally landed at: https://codereview.chromium.org/480533002/ - Properly pass font render settings to Skia font data functions. Otherwise Skia always returns rounded values. - If subpixel positioning is off, round the glyph positions to match Pango's rounding logic. BUG=402715,402374,402347 TEST=On Linux, character positions in UI text (address bar, infobars, tab titles) should be identical with --enable-harfbuzz-rendertext and --disable-harfbuzz-rendertext. Review URL: https://codereview.chromium.org/484883003 Cr-Commit-Position: refs/heads/master@{#291767}
* Revert 290474 "RenderTextHarfBuzz: Set font render parameters in..."sashab@chromium.org2014-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | > RenderTextHarfBuzz: Set font render parameters in font data functions > > - Properly pass font render settings to Skia font data functions. Otherwise Skia always returns rounded values. > > - If subpixel positioning is off, round the glyph positions to match Pango's rounding logic. > > BUG=402715,402374,402347 > TEST=On Linux, character positions in UI text (address bar, infobars, tab titles) should be identical with --enable-harfbuzz-rendertext and --disable-harfbuzz-rendertext. > NOTRY=true > > Review URL: https://codereview.chromium.org/480533002 Caused compile failure on chromium.mac: http://build.chromium.org/p/chromium.mac/builders/Mac%20Builder%20%28dbg%29/builds/71709/steps/compile/logs/stdio TBR=ckocagil@chromium.org Review URL: https://codereview.chromium.org/482383002 Cr-Commit-Position: refs/heads/master@{#290476} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290476 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Set font render parameters in font data functionsckocagil@chromium.org2014-08-191-0/+1
| | | | | | | | | | | | | | | - Properly pass font render settings to Skia font data functions. Otherwise Skia always returns rounded values. - If subpixel positioning is off, round the glyph positions to match Pango's rounding logic. BUG=402715,402374,402347 TEST=On Linux, character positions in UI text (address bar, infobars, tab titles) should be identical with --enable-harfbuzz-rendertext and --disable-harfbuzz-rendertext. NOTRY=true Review URL: https://codereview.chromium.org/480533002 Cr-Commit-Position: refs/heads/master@{#290474} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290474 0039d316-1c4b-4281-b951-d872f2087c98
* Support float widths in RenderTextHarfBuzz.msw@chromium.org2014-08-081-2/+3
| | | | | | | | | | | | | | The gfx_unittests CanvasTestMac.* passes on Mac Views. (can also run the tests with --enable-harfbuzz-rendertext) BUG=391843 TEST=CanvasTestMac.* passes, no Mac text rendering changes. R=asvitkine@chromium.org,ckocagil@chromium.org Review URL: https://codereview.chromium.org/440213004 Cr-Commit-Position: refs/heads/master@{#288255} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288255 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Check CreateSkiaTypeface return value against NULLckocagil@chromium.org2014-08-031-1/+2
| | | | | | | | BUG=398712 Review URL: https://codereview.chromium.org/435583003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287250 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Allow mid-glyph cursors in multi-grapheme clustersckocagil@chromium.org2014-07-301-4/+22
| | | | | | | | | | | | Use the Unicode grapheme boundary algorithm via ICU BreakIterator to count graphemes in clusters BUG=383265 TBR=jshin NOTRY=true Review URL: https://codereview.chromium.org/351963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286569 0039d316-1c4b-4281-b951-d872f2087c98
* Prepare to enable RenderTextHarfBuzz by defaultckocagil@chromium.org2014-07-261-1/+1
| | | | | | | | | | | | | - Fix and partially disable the RenderText unit tests to make sure RenderTextHarfBuzz passes the tests. Call EnsureLayout() in GetGlyphBounds() since it has been made public by r252873. - Add a "--disable-harfbuzz-rendertext" switch to make enabling RTHB by default easier. BUG=321868 NOTRY=true Review URL: https://codereview.chromium.org/419753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285761 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Implement font fallback for Win and Linuxckocagil@chromium.org2014-07-191-2/+4
| | | | | | | | BUG=321868 Review URL: https://codereview.chromium.org/331713003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284297 0039d316-1c4b-4281-b951-d872f2087c98
* Move unusual character block logic to a helper functionckocagil@chromium.org2014-06-121-0/+1
| | | | | | | | | | BUG= NOTRY=true R=msw Review URL: https://codereview.chromium.org/324983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276776 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land RenderTextHarfBuzz: Decide run direction by BiDi embedding levelckocagil@chromium.org2014-06-121-1/+4
| | | | | | | | | | | | Original CL: https://codereview.chromium.org/326123003/ BUG=382178 NOTRY=true R=msw Review URL: https://codereview.chromium.org/323403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276525 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of RenderTextHarfBuzz: Decide run direction by BiDi embedding level ↵ckocagil@chromium.org2014-06-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/326123003/) Reason for revert: Memory leak: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%282%29/builds/3570/steps/ui_unittests/logs/HarfBuzz_RunDirection Original issue's description: > RenderTextHarfBuzz: Decide run direction by BiDi embedding level > > BUG=382178 > NOTRY=true > R=msw > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276379 TBR=msw@chromium.org NOTREECHECKS=true NOTRY=true BUG=382178 Review URL: https://codereview.chromium.org/324413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276387 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Decide run direction by BiDi embedding levelckocagil@chromium.org2014-06-111-1/+4
| | | | | | | | | | BUG=382178 NOTRY=true R=msw Review URL: https://codereview.chromium.org/326123003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276379 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the Char to Glyph mapping logic in RenderTextHarfBuzzckocagil@chromium.org2014-06-081-1/+1
| | | | | | | | | | BUG=321868 R=msw@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/300623003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275754 0039d316-1c4b-4281-b951-d872f2087c98
* Replace bare ICU run iterator with base::i18n::BiDiLineIteratorckocagil@chromium.org2014-05-281-1/+1
| | | | | | | | | | | Also simplifies text run direction logic. BUG=321868 R=msw@chromium.org Review URL: https://codereview.chromium.org/299313005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273159 0039d316-1c4b-4281-b951-d872f2087c98
* More or less implement RenderTextHarfBuzzckocagil@chromium.org2014-05-221-0/+126
Skia font lookup functions for HarfBuzz are from Blink. Much of the implementation copied from RenderTextWin. In the future we should either move the copied methods up, or get rid of all the other RenderText implementations in favor of this one. BUG=321868 TBR=behdad@chromium.org Review URL: https://codereview.chromium.org/152473008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272260 0039d316-1c4b-4281-b951-d872f2087c98