This tries to clean up some of the awkwardness from bug 1730772 so that we can
do further fixes more easily if necessary.
Differential Revision: https://phabricator.services.mozilla.com/D133353
The default Cairo-compatible behavior of ignoring all embedded bitmaps in a font
if hinting is disabled and antialiasing is enabled seems to not work with emoji
fonts like Noto Color Emoji which do not have any outlines at all, but do have
color bitmaps that present as scalable. Detect this corner case and allow bitmaps.
Differential Revision: https://phabricator.services.mozilla.com/D133328
This is a "simplified" implementation of 'ic', similar to what Safari Preview
currently supports: it only considers the advance of U+6C34 if found in the
first available font, and otherwise falls back to the default of 1em.
(The spec allows for this "in cases where it is impossible or impractical to
determine the ideographic advance measure".)
Differential Revision: https://phabricator.services.mozilla.com/D132818
In bug 1547063, a bug was introduced where a logic condition was improperly negated.
!(printing || !hinting) became (!printing || hinting), when the negation is actually
!printing && hinting. This fixes that so that we do the right thing here and actually
ignore the following hint-style check if hinting is false.
Differential Revision: https://phabricator.services.mozilla.com/D128017
This does not in itself change user-visible behavior, but is a foundation for bug
1715507 where we will make the behavior per-context instead of global. This is basically
just plumbing, passing a pointer to the presContext that's asking for fonts to be
resolved all the way down to the gfx code that handles the font list and looks up
fonts.
For the immediate goal of making font visibility work per-context, it would be
sufficient to pass the desired visibility level in to the font-selection methods.
However, passing the actual presContext down (and not just its visibility level)
will enable us to report back via the dev console when a font is blocked (see bug
1715537), so the approach here provides the basis for that upcoming enhancement.
Depends on D124194
Differential Revision: https://phabricator.services.mozilla.com/D124195
This does not in itself change user-visible behavior, but is a foundation for bug
1715507 where we will make the behavior per-context instead of global. This is basically
just plumbing, passing a pointer to the presContext that's asking for fonts to be
resolved all the way down to the gfx code that handles the font list and looks up
fonts.
For the immediate goal of making font visibility work per-context, it would be
sufficient to pass the desired visibility level in to the font-selection methods.
However, passing the actual presContext down (and not just its visibility level)
will enable us to report back via the dev console when a font is blocked (see bug
1715537), so the approach here provides the basis for that upcoming enhancement.
Depends on D124194
Differential Revision: https://phabricator.services.mozilla.com/D124195
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.
Differential Revision: https://phabricator.services.mozilla.com/D118011
This produces the desired rendering here by effectively "deprioritizing"
faces from fonts that have multiple names.
Your call whether this is a good idea or not, seems reasonable off-hand
to me.
Differential Revision: https://phabricator.services.mozilla.com/D111283
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.
Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.
Differential Revision: https://phabricator.services.mozilla.com/D107406
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.
Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.
Differential Revision: https://phabricator.services.mozilla.com/D107406
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.
Differential Revision: https://phabricator.services.mozilla.com/D105473
This allows us to default to skipping the bundled Twemoji Mozilla font when running on Win8.1 or later,
where we can assume Segoe UI Emoji is available.
The new pref here replaces the existing pair of boolean prefs that were only supported on Android,
and is now respected on all platforms. Available settings are:
0 disable use of app-bundled fonts
> 0 enable use of app-bundled fonts
< 0 default (auto): decide at startup, based on the system environment
(The pref is relevant only at startup; changing its value during a session will not make the bundled fonts
appear/disappear dynamically.)
Differential Revision: https://phabricator.services.mozilla.com/D102085