Skip to content
pixi-silk
GitHub repository
Function

sameFont

import { sameFont } from 'pixi-silk/i18n';
function sameFont(shaper: Pick<RuntimeShaper, "fontHash">, face: {
  hash: string;
}): boolean;

True when a shaper’s font is the one a bundle face was baked from. When it is not, the brief’s rule applies: warn, and keep the baked data for static text.

Parameters#

ParameterType
shaperPick<RuntimeShaper, "fontHash">
face{ hash: string; }
face.hashstring

Returns#

boolean