Fix display of some emoji on Windows (#1933)

This commit is contained in:
Herb Caudill 2020-07-19 21:14:45 +02:00 committed by GitHub
parent e2640edb79
commit 29f803e25d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,10 @@
import { FlooredNumber } from "./types";
import { getZoomOrigin } from "./scene";
import { CURSOR_TYPE, FONT_FAMILY } from "./constants";
import {
CURSOR_TYPE,
FONT_FAMILY,
WINDOWS_EMOJI_FALLBACK_FONT,
} from "./constants";
import { FontFamily, FontString } from "./element/types";
export const SVG_NS = "http://www.w3.org/2000/svg";
@ -66,7 +70,7 @@ export const getFontFamilyString = ({
}: {
fontFamily: FontFamily;
}) => {
return FONT_FAMILY[fontFamily];
return `${FONT_FAMILY[fontFamily]}, ${WINDOWS_EMOJI_FALLBACK_FONT}`;
};
/** returns fontSize+fontFamily string for assignment to DOM elements */