fonts: assume emoji presentation for fonts with "moji" in their name
previously, we'd match "emoji", but that wouldn't match openmoji.
This commit is contained in:
1 parent
f9cfde3b98
commit
b98fb8410b
1 file changed
+5
-2
@@ -667,10 +667,13 @@ impl ParsedFont {
|
||||
&& self.weight >= FontWeight::REGULAR;
|
||||
|
||||
// If they explicitly list an emoji font, assume that they
|
||||
// want it to be used for emoji presentation
|
||||
// want it to be used for emoji presentation.
|
||||
// We match on "moji" rather than "emoji" as there are
|
||||
// emoji fonts that are moji rather than emoji :-/
|
||||
// This heuristic is awful, TBH.
|
||||
if !self.is_built_in_fallback
|
||||
&& !attr.is_synthetic
|
||||
&& self.names.full_name.to_lowercase().contains("emoji")
|
||||
&& self.names.full_name.to_lowercase().contains("moji")
|
||||
{
|
||||
self.assume_emoji_presentation = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user