Fix calculateAuthorWidth for emojis (#1130)
This commit is contained in:
parent
bfdcf6d9b0
commit
bf4ff6355a
@ -3,7 +3,7 @@ let element: HTMLSpanElement | undefined;
|
||||
export default function calculateAuthorWidth(text: string) {
|
||||
if (!element) {
|
||||
element = document.createElement('span');
|
||||
element.style.font = '400 12px Roboto, "Helvetica Neue", sans-serif';
|
||||
element.style.font = '400 12px Roboto, "Helvetica Neue", "Apple Color Emoji", sans-serif';
|
||||
element.style.whiteSpace = 'nowrap';
|
||||
element.style.position = 'absolute';
|
||||
element.style.left = '-999px';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user