UNPKG

expo-font

Version:

Load fonts at runtime and use them in React Native components.

12 lines (8 loc) 435 B
import { NativeModule, registerWebModule, UnavailabilityError } from 'expo-modules-core'; import type { RenderToImageOptions } from './FontUtils.types'; class ExpoFontUtils extends NativeModule { async renderToImageAsync(glyphs: string, options?: RenderToImageOptions): Promise<string> { throw new UnavailabilityError('expo-font', 'renderToImageAsync'); } } export default registerWebModule(ExpoFontUtils, 'ExpoFontUtils');