Ehsan Akhgari
e5e885ae31
Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
...
# ignore-this-changeset
--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Jeff Muizelaar
6bf19bfac4
Bug 1516677
. Remove unused drawtarget parameter. r=jfkthame
...
With bug 1509358 having landed we don't need a draw target in a bunch of
places. This removes it from those places.
Differential Revision: https://phabricator.services.mozilla.com/D15481
--HG--
extra : moz-landing-system : lando
2018-12-31 11:43:27 +00:00
Tooru Fujisawa
7983faeb5d
Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp
2018-12-01 04:52:05 +09:00
Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jonathan Kew
0165cf1194
Bug 1478716 - Ensure we only call FT_Get_MM_Var once per face (and cache the result in the font entry), to avoid being bitten by freetype bug 52955 on Ubuntu. r=lsalzman
2018-08-01 22:39:05 +01:00
Ryan Hunt
6497093aa2
Bug 1471261 - Add global locking around FT_Load_Glyph to work around postscript hinter global data. r=lsalzman
...
MozReview-Commit-ID: 9ohfqUnPxMc
--HG--
extra : rebase_source : b4a0e02cd0685a1623cc2bd0ffdc34429f3b8729
2018-06-26 11:30:13 -04:00
Chris Peterson
71422dcaa9
Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
...
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent
MozReview-Commit-ID: KuUsnVe2h8L
--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Xidorn Quan
f62e2a947a
Bug 1406552 - Only update max ascent / descent with em ones when ascent and descent are zero. r=jfkthame
...
The original code was added in bug 385263 for fixing bug 279032 that a
single font provides zero for max ascent / descent in its HHEA table
which caused Firefox to crash.
Unconditionally picking the maximum of max ascent / descent and their
em correspondents doesn't seem to be essential for working around that
case, so this patch changes it to just use the em ascent / descent when
both max ascent and descent are zero.
This fixes a webcompat problem related to Roboto font on Linux (and
presumably also Android given it uses FreeType backend as well).
MozReview-Commit-ID: EpKrfiOwnZt
--HG--
extra : rebase_source : 0619abf992fb1e1a1f3068ab172880913ebff1f1
2018-05-03 19:43:46 +10:00
Jonathan Kew
e92b9e44cf
Bug 1449605 - part 1 - Rearrange thebes font code so that the decision whether to apply synthetic-bold is deferred until actually instantiating a font, not made during the font-matching process. r=jwatt
...
This rearranges how synthetic-bold use is determined in the font selection
& rendering code. Previously, we would decide during the font-selection
algorithm whether we need to apply synthetic-bold to the chosen face, and
then pass that decision through the fontgroup (storing it in the FamilyFace
entries of the mFonts array there) down to the actual rendering code that
instantiates fonts from the faces (font entries) we've selected.
That became a problem for variation fonts because in the case of a user
font, we may not have downloaded the resource yet, so we just have a "user
font container" entry, which carries the descriptors from the @font-face
rule and will fetch the actual resource when needed. But in the case of a
@font-face rule without a weight descriptor, we don't actually know at
font-selection time whether the face will support "true" bold (via a
variation axis) or not, so we can't reliably make the right decision about
applying synthetic bold.
So we now defer that decision until we actually instantiate a platform font
object to shape/measure/draw text. At that point, we have the requested
style and we also have the real font resource, so we can easily determine
whether fake-bold is required.
(This patch should not result in any visible behavior change; that will
come in a second patch now that the architecture supports it.)
2018-05-01 10:30:50 +01:00
Jonathan Kew
c57f185cd9
Bug 1454598 - part 3 - Use WeightRange more extensively in place of FontWeight throughout user-font handling and font-entry creation, and handle Stretch and SlantStyle similarly. r=jwatt
2018-04-25 07:18:23 +01:00
Jonathan Kew
9872150acc
Bug 1454598 - part 2 - Allow variation fonts to record a weight range in gfxFontEntry, and update font-matching to handle ranges. r=jwatt
2018-04-25 07:18:23 +01:00
Jonathan Kew
7e27ba83c3
Backed out 4 changesets from bug 1454598 (26e036b1c703, bc910e36a7d7, bac001216577, 5af215d265b6) due to macOS 10.12 font issues.
2018-04-25 10:18:07 +01:00
Jonathan Kew
8489323f79
Bug 1454598 - part 3 - Use WeightRange more extensively in place of FontWeight throughout user-font handling and font-entry creation, and handle Stretch and SlantStyle similarly. r=jwatt
2018-04-25 07:18:23 +01:00
Jonathan Kew
6ca182d055
Bug 1454598 - part 2 - Allow variation fonts to record a weight range in gfxFontEntry, and update font-matching to handle ranges. r=jwatt
2018-04-25 07:18:23 +01:00
Cosmin Sabou
dcacfcfc71
Backed out 2 changesets (bug 1454598) as requested by Mossop in developers channel. a=backout
...
Backed out changeset b673e87d6134 (bug 1454598)
Backed out changeset 072dc1504ce6 (bug 1454598)
2018-04-20 06:45:39 +03:00
Jonathan Kew
6f1e2a29b3
Bug 1454598 - part 2 - Allow variation fonts to record a weight range in gfxFontEntry, and update font-matching to handle ranges. r=jwatt
2018-04-19 13:28:13 +01:00
Jonathan Kew
464c469099
Bug 1440938 - Fall back to cairo's glyph metrics API if FreeType fails in some way, or if we're not using a variation font. r=lsalzman
2018-02-28 22:02:25 +00:00
Jonathan Kew
ee890ee757
Bug 1435984 - patch 7 - Apply variation settings from the font entry in the gfxFT2Fonts (Android) back-end. r=lsalzman
...
--HG--
extra : source : d4e3a21dc093c84530f28394089be13324915377
2018-02-14 22:02:05 +11:00
Jonathan Kew
5b9b689254
Bug 1434699 - Don't use dlsym() to look up FreeType functions when building with MOZ_TREE_FREETYPE. r=lsalzman
2018-02-01 15:28:09 +00:00
Jonathan Kew
82f83b9470
Bug 1433402 - Use the specific FT_Done_MM_Var function if available (on sufficiently recent freetype) to release the struct returned by FT_Get_MM_Var. r=jrmuizel
2018-01-29 13:24:11 +00:00
Jonathan Kew
7ff4c1c33d
Bug 1430446 - Prefer hinted glyph widths from FreeType, except when hinting is disabled or the font includes variations. r=lsalzman
2018-01-23 18:16:42 +00:00
Jonathan Kew
e164d9c087
Bug 1430552 - Handle possible freetype failures in gfxFT2FontBase::GetFTGlyphAdvance to avoid risk of crashes. r=lsalzman
2018-01-15 16:36:47 +00:00
Jonathan Kew
42e35bdbd0
Bug 1430216 - For non-scalable fonts, we can't use the linearHoriAdvance field from the glyph slot; use the advance field instead to get proper metrics. r=lsalzman
2018-01-13 15:16:44 +00:00
Jonathan Kew
80ebb3e8d9
Bug 1428826 - Don't rely on FT_Get_Advance for glyph widths, get the advance from the glyph slot instead for better consistency with cairo metrics & rendering; update test expectations for minor changes in rendering. r=lsalzman
2018-01-09 17:36:37 +00:00
Jonathan Kew
6cf89ddd0e
Bug 1427641 - patch 8 - Refactor gfxFT2FontBase glyph-width code so that we properly respect variations when getting character widths during InitMetrics. r=lsalzman
2018-01-02 13:29:54 +00:00
Jonathan Kew
7222178ff9
Bug 1427641 - patch 7 - Work around buggy FreeType metrics APIs when using variation fonts with FT versions prior to 2.8.2. r=lsalzman
2018-01-02 13:29:48 +00:00
Jonathan Kew
88ac266967
Bug 1427641 - patch 3 - Add variation data to the cairo_ft_*_font objects, so they can properly track instances of the same font resource used with different variation parameters. r=lsalzman
2017-12-07 13:22:49 +00:00
Jonathan Kew
5080cdedd5
Bug 1427641 - patch 2 - Convert variation values into FreeType's data type, and apply them to the FT_Face. r=lsalzman
2017-12-06 14:42:42 +00:00
Jonathan Kew
7ef5a362b4
Bug 1427641 - patch 1 - Get glyph widths directly from the FreeType face, instead of via a cairo scaled_font wrapper. r=lsalzman
2017-12-06 13:51:39 +00:00
Lee Salzman
2276117381
Bug 1385029 - remove redundant CairoScaledFont accessor from gfxFont subclasses. r=jfkthame
...
MozReview-Commit-ID: BjcKkCgSZdG
2017-08-07 16:20:40 -04:00
Lee Salzman
84420597a9
Bug 1383767 - remove cases of recursive locking of FreeType inside thebes. r=jfkthame
...
MozReview-Commit-ID: 1KuOq8jmj0H
2017-07-26 23:24:48 -04:00
Carsten "Tomcat" Book
8941796c79
Backed out changeset cecd14ecca85 (bug 1383767)
2017-07-27 08:19:54 +02:00
Lee Salzman
bcac1f2797
Bug 1383767 - remove cases of recursive locking of FreeType inside thebes. r=jfkthame
...
MozReview-Commit-ID: 1KuOq8jmj0H
2017-07-26 23:24:48 -04:00
Lee Salzman
a168dcdbf3
Bug 1348980 - implement UnscaledFont API for Moz2D and thebes. r=jfkthame
2017-04-06 17:41:02 -04:00
Jonathan Kew
5a98bcfa1e
Bug 1278614 - Update the freetype-based GetGlyph method to conform to the expectations of the HarfBuzz callbacks, returning 0 for unsupported <Base, Variation-Selector> sequences instead of automatically returning the default mapping and ignoring the VS. r=karlt
2016-06-07 20:29:25 +01:00
Nicholas Nethercote
3493a38202
Bug 1232822 (part 6) - Move RefCairo() from gfxContext to gfxFont. r=jfkthame.
...
Because gfxContext will one day disappear, and gfxFont seems like a good place
to move it to.
2015-12-15 20:10:04 -08:00
Nicholas Nethercote
2a8e0225ac
Bug 1232822 (part 1) - Moz2Dify SetupCairoFont(). r=jfkthame.
...
This is now trivial.
2015-12-15 13:56:40 -08:00
Nicholas Nethercote
a4dc4a929c
Bug 1232576 (part 2) - Rename gfxContext::GetCairo() as GetRefCairo() and make it static. r=jfkthame.
...
This means its callers now need a DrawTarget instead of a gfxContext.
--HG--
extra : rebase_source : 909cbf179cfbffa47fb70f417b2f50b641534a02
2015-12-14 22:26:23 -08:00
Nicholas Nethercote
922099a41a
Bug 1232576 (part 1) - Move the reference |cairo_t*| from gfxContext to DrawTarget (as user data). r=jfkthame.
...
--HG--
extra : rebase_source : 5f4be8b9cb4a24527ee95468239ff6ff26d4a279
2015-12-14 22:23:51 -08:00
L. David Baron
026c5518c7
Bug 1144885 - Treat font-size-adjust: none as separate from font-size-adjust: 0. r=jdaggett
...
Without the patch, the addition to property_database.js leads to
failures related to the "0.0" and "0" values in
layout/style/test/test_value_computation.html .
2015-04-20 23:10:40 -07:00
Robert O'Callahan
d4b40be62c
Bug 1099977. Part 1.5: Make gfxFT2FontBase::GetSpaceGlyph work for zero-sized fonts. r=jfkthame
...
--HG--
extra : rebase_source : 41fe8ce9c751d4ffcfa3adb001640c60d1f4c449
2014-11-19 22:41:42 +13:00
Jonathan Kew
674676fba3
Bug 1118943 - Ensure mFUnitsConvFactor is set up properly for vertical fonts in the FT2 backend. r=smontagu
2015-01-07 23:42:40 +00:00
John Daggett
7837d2ecf9
Bug 1109403 - trim out unused Azure FontOptions struct. r=m_kato
2014-12-10 13:09:30 +09:00
Jonathan Watt
d6d15a2f78
Bug 1093811 - Convert the gfxFont::GetGlyphWidth() virtual method to take a Moz2D DrawTarget instead of a Thebes gfxContext. r=jfkthame
2014-11-10 21:41:41 +00:00
Jonathan Kew
55f3a61af3
Bug 1065002 pt 1.1 - Rename gfxFont::GetMetrics to GetHorizontalMetrics, and add a GetMetrics wrapper to access it. r=jdaggett
2014-09-30 07:37:40 +01:00
John Daggett
acd3c4ca2c
Bug 1029307 - remove subscript/superscript metrics. r=heycam
2014-06-28 15:40:36 +09:00
Frédéric Wang
dd936cd2e4
Bug 407059 - Part 4: Use gfxHarfbuzzShaper::GetGlyphHAdvance() for math operators. r=jfkthame
2014-04-23 06:57:42 -07:00
Ryan VanderMeulen
0691160cfe
Backed out 5 changesets (bug 407059) for reftest asserts.
...
Backed out changeset 21fee1261f2e (bug 407059)
Backed out changeset c940a2d399c4 (bug 407059)
Backed out changeset 77593dd1b044 (bug 407059)
Backed out changeset cfcbc731d4db (bug 407059)
Backed out changeset d8244f3ecdcb (bug 407059)
2014-04-22 11:00:13 -04:00
Frédéric Wang
b7d34cd584
Bug 407059 - Part 4: Use gfxHarfbuzzShaper::GetGlyphHAdvance() for math operators. r=jfkthame
2014-04-22 08:44:04 -04:00
Masatoshi Kimura
5e7240163c
Bug 989557 - Implement a fallback for CJK Compatibility Ideographs Standardized Variants. r=jfkthame
...
--HG--
rename : layout/reftests/fonts/gw432047-license.txt => layout/reftests/fonts/glyphwiki-license.txt
2014-04-01 02:30:26 +09:00