Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tommy Webb
Tor Browser
Commits
a20c1a8d
Commit
a20c1a8d
authored
7 years ago
by
Lee Salzman
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1400721 - fix Skia's glyph LCD filter padding for FreeType 2.8.1. r=jrmuizel
MozReview-Commit-ID: JFvnANsTS0r
parent
c4dc79b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
+9
-4
9 additions, 4 deletions
gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
with
9 additions
and
4 deletions
gfx/skia/skia/src/ports/SkFontHost_cairo.cpp
+
9
−
4
View file @
a20c1a8d
...
...
@@ -666,10 +666,15 @@ void SkScalerContext_CairoFT::generateMetrics(SkGlyph* glyph)
glyph
->
fTop
=
-
SkToS16
(
SkFDot6Floor
(
bbox
.
yMax
));
glyph
->
fLeft
=
SkToS16
(
SkFDot6Floor
(
bbox
.
xMin
));
if
(
isLCD
(
fRec
)
&&
gSetLcdFilter
&&
(
fLcdFilter
==
FT_LCD_FILTER_DEFAULT
||
fLcdFilter
==
FT_LCD_FILTER_LIGHT
))
{
if
(
isLCD
(
fRec
))
{
// In FreeType < 2.8.1, LCD filtering, if explicitly used, may
// add padding to the glyph. When not used, there is no padding.
// As of 2.8.1, LCD filtering is now always supported and may
// add padding even if an LCD filter is not explicitly set.
// Regardless, if no LCD filtering is used, or if LCD filtering
// doesn't add padding, it is safe to modify the glyph's bounds
// here. generateGlyphImage will detect if the mask is smaller
// than the bounds and clip things appropriately.
if
(
fRec
.
fFlags
&
kLCD_Vertical_Flag
)
{
glyph
->
fTop
-=
1
;
glyph
->
fHeight
+=
2
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment