How to use the expo-constants.systemFonts function in expo-constants

To help you get started, we’ve selected a few expo-constants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / expo-constants_v4.x.x / flow_v0.69.0-v0.103.x / test_expo-constants.js View on Github external
// $ExpectError
      (Constants.installationId: 'ups...');
      // $ExpectError
      (Constants.isDevice: 'ups...');
      // $ExpectError
      (Constants.isHeadless: 'ups...');
      // $ExpectError
      (Constants.linkingUri: 'ups...');
      // $ExpectError
      (Constants.sessionId: 'ups...');
      // $ExpectError
      (Constants.statusBarHeight: 'ups...');
      // $ExpectError
      (Constants.systemVersion: 'ups...');
      // $ExpectError
      (Constants.systemFonts: 'ups...');
    });
  });
github janaagaard75 / expo-and-typescript / src / constants / SystemFontsScreen.tsx View on Github external
public render() {
    return (
      
        {/* Cast to a string array (Constants.systemFonts as Array)... if using the native types provided by expo insted of @types/expo. See tsconfig.json. */}
        {Constants.systemFonts.map((systemFont, index) => (
          
        ))}
      
    );
  }
}
github Marwan01 / food-converter / node_modules / expo-font / build / Font.js View on Github external
export function processFontFamily(name) {
    if (typeof name !== 'string' || Constants.systemFonts.includes(name) || name === 'System') {
        return name;
    }
    if (name.includes(Constants.sessionId)) {
        return name;
    }
    if (!isLoaded(name)) {
        if (__DEV__) {
            if (isLoading(name)) {
                console.error(`You started loading the font "${name}", but used it before it finished loading.\n
- You need to wait for Font.loadAsync to complete before using the font.\n
- We recommend loading all fonts before rendering the app, and rendering only Expo.AppLoading while waiting for loading to complete.`);
            }
            else {
                console.error(`fontFamily "${name}" is not a system font and has not been loaded through Font.loadAsync.\n
- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.\n
- If this is a custom font, be sure to load it with Font.loadAsync.`);
github Marwan01 / food-converter / node_modules / expo-font / src / Font.ts View on Github external
export function processFontFamily(name: string | null): string | null {
  if (typeof name !== 'string' || Constants.systemFonts.includes(name) || name === 'System') {
    return name;
  }

  if (name.includes(Constants.sessionId)) {
    return name;
  }

  if (!isLoaded(name)) {
    if (__DEV__) {
      if (isLoading(name)) {
        console.error(
          `You started loading the font "${name}", but used it before it finished loading.\n
- You need to wait for Font.loadAsync to complete before using the font.\n
- We recommend loading all fonts before rendering the app, and rendering only Expo.AppLoading while waiting for loading to complete.`
        );
      } else {
github expo / expo / packages / expo-font / src / FontLoader.ts View on Github external
export function fontFamilyNeedsScoping(name: string): boolean {
  return (
    (isInClient || isInIOSStandalone) &&
    !Constants.systemFonts.includes(name) &&
    name !== 'System' &&
    !name.includes(Constants.sessionId)
  );
}
github expo / expo / packages / expo-font / build / FontLoader.js View on Github external
export function fontFamilyNeedsScoping(name) {
    return ((isInClient || isInIOSStandalone) &&
        !Constants.systemFonts.includes(name) &&
        name !== 'System' &&
        !name.includes(Constants.sessionId));
}
export function getAssetForSource(source) {