Use the Sofia Sans Extra Condensed font family from Google Fonts in your Expo app
npm install @expo-google-fonts/sofia-sans-extra-condensed!npm version
!license
!publish size
!publish size
This package lets you use the Sofia Sans Extra Condensed font family from Google Fonts in your Expo app.
This font family contains 18 styles.
- SofiaSansExtraCondensed_100Thin
- SofiaSansExtraCondensed_200ExtraLight
- SofiaSansExtraCondensed_300Light
- SofiaSansExtraCondensed_400Regular
- SofiaSansExtraCondensed_500Medium
- SofiaSansExtraCondensed_600SemiBold
- SofiaSansExtraCondensed_700Bold
- SofiaSansExtraCondensed_800ExtraBold
- SofiaSansExtraCondensed_900Black
- SofiaSansExtraCondensed_100Thin_Italic
- SofiaSansExtraCondensed_200ExtraLight_Italic
- SofiaSansExtraCondensed_300Light_Italic
- SofiaSansExtraCondensed_400Regular_Italic
- SofiaSansExtraCondensed_500Medium_Italic
- SofiaSansExtraCondensed_600SemiBold_Italic
- SofiaSansExtraCondensed_700Bold_Italic
- SofiaSansExtraCondensed_800ExtraBold_Italic
- SofiaSansExtraCondensed_900Black_Italic
Run this command from the shell in the root directory of your Expo project to add the font family package to your project
``sh`
npx expo install @expo-google-fonts/sofia-sans-extra-condensed expo-font
Now add code like this to your project
`js
import { Text, View } from "react-native";
import { useFonts } from '@expo-google-fonts/sofia-sans-extra-condensed/useFonts';
import { SofiaSansExtraCondensed_100Thin } from '@expo-google-fonts/sofia-sans-extra-condensed/100Thin';
import { SofiaSansExtraCondensed_200ExtraLight } from '@expo-google-fonts/sofia-sans-extra-condensed/200ExtraLight';
import { SofiaSansExtraCondensed_300Light } from '@expo-google-fonts/sofia-sans-extra-condensed/300Light';
import { SofiaSansExtraCondensed_400Regular } from '@expo-google-fonts/sofia-sans-extra-condensed/400Regular';
import { SofiaSansExtraCondensed_500Medium } from '@expo-google-fonts/sofia-sans-extra-condensed/500Medium';
import { SofiaSansExtraCondensed_600SemiBold } from '@expo-google-fonts/sofia-sans-extra-condensed/600SemiBold';
import { SofiaSansExtraCondensed_700Bold } from '@expo-google-fonts/sofia-sans-extra-condensed/700Bold';
import { SofiaSansExtraCondensed_800ExtraBold } from '@expo-google-fonts/sofia-sans-extra-condensed/800ExtraBold';
import { SofiaSansExtraCondensed_900Black } from '@expo-google-fonts/sofia-sans-extra-condensed/900Black';
import { SofiaSansExtraCondensed_100Thin_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/100Thin_Italic';
import { SofiaSansExtraCondensed_200ExtraLight_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/200ExtraLight_Italic';
import { SofiaSansExtraCondensed_300Light_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/300Light_Italic';
import { SofiaSansExtraCondensed_400Regular_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/400Regular_Italic';
import { SofiaSansExtraCondensed_500Medium_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/500Medium_Italic';
import { SofiaSansExtraCondensed_600SemiBold_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/600SemiBold_Italic';
import { SofiaSansExtraCondensed_700Bold_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/700Bold_Italic';
import { SofiaSansExtraCondensed_800ExtraBold_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/800ExtraBold_Italic';
import { SofiaSansExtraCondensed_900Black_Italic } from '@expo-google-fonts/sofia-sans-extra-condensed/900Black_Italic';
export default () => {
let [fontsLoaded] = useFonts({
SofiaSansExtraCondensed_100Thin,
SofiaSansExtraCondensed_200ExtraLight,
SofiaSansExtraCondensed_300Light,
SofiaSansExtraCondensed_400Regular,
SofiaSansExtraCondensed_500Medium,
SofiaSansExtraCondensed_600SemiBold,
SofiaSansExtraCondensed_700Bold,
SofiaSansExtraCondensed_800ExtraBold,
SofiaSansExtraCondensed_900Black,
SofiaSansExtraCondensed_100Thin_Italic,
SofiaSansExtraCondensed_200ExtraLight_Italic,
SofiaSansExtraCondensed_300Light_Italic,
SofiaSansExtraCondensed_400Regular_Italic,
SofiaSansExtraCondensed_500Medium_Italic,
SofiaSansExtraCondensed_600SemiBold_Italic,
SofiaSansExtraCondensed_700Bold_Italic,
SofiaSansExtraCondensed_800ExtraBold_Italic,
SofiaSansExtraCondensed_900Black_Italic
});
let fontSize = 24;
let paddingVertical = 6;
if (!fontsLoaded) {
return null;
} else {
return (
paddingVertical,
// Note the quoting of the value for fontFamily here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_100Thin"
}}>
Sofia Sans Extra Condensed Thin
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_200ExtraLight"
}}>
Sofia Sans Extra Condensed Extra Light
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_300Light"
}}>
Sofia Sans Extra Condensed Light
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_400Regular"
}}>
Sofia Sans Extra Condensed Regular
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_500Medium"
}}>
Sofia Sans Extra Condensed Medium
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_600SemiBold"
}}>
Sofia Sans Extra Condensed Semi Bold
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_700Bold"
}}>
Sofia Sans Extra Condensed Bold
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_800ExtraBold"
}}>
Sofia Sans Extra Condensed Extra Bold
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_900Black"
}}>
Sofia Sans Extra Condensed Black
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_100Thin_Italic"
}}>
Sofia Sans Extra Condensed Thin Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_200ExtraLight_Italic"
}}>
Sofia Sans Extra Condensed Extra Light Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_300Light_Italic"
}}>
Sofia Sans Extra Condensed Light Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_400Regular_Italic"
}}>
Sofia Sans Extra Condensed Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_500Medium_Italic"
}}>
Sofia Sans Extra Condensed Medium Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_600SemiBold_Italic"
}}>
Sofia Sans Extra Condensed Semi Bold Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_700Bold_Italic"
}}>
Sofia Sans Extra Condensed Bold Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!fontFamily
fontFamily: "SofiaSansExtraCondensed_800ExtraBold_Italic"
}}>
Sofia Sans Extra Condensed Extra Bold Italic
paddingVertical,
// Note the quoting of the value for here; it expects a string!
fontFamily: "SofiaSansExtraCondensed_900Black_Italic"
}}>
Sofia Sans Extra Condensed Black Italic
);
}
};
`
||||
|-|-|-|
|!SofiaSansExtraCondensed_100Thin|!SofiaSansExtraCondensed_200ExtraLight|!SofiaSansExtraCondensed_300Light||
|!SofiaSansExtraCondensed_400Regular|!SofiaSansExtraCondensed_500Medium|!SofiaSansExtraCondensed_600SemiBold||
|!SofiaSansExtraCondensed_700Bold|!SofiaSansExtraCondensed_800ExtraBold|!SofiaSansExtraCondensed_900Black||
|!SofiaSansExtraCondensed_100Thin_Italic|!SofiaSansExtraCondensed_200ExtraLight_Italic|!SofiaSansExtraCondensed_300Light_Italic||
|!SofiaSansExtraCondensed_400Regular_Italic|!SofiaSansExtraCondensed_500Medium_Italic|!SofiaSansExtraCondensed_600SemiBold_Italic||
|!SofiaSansExtraCondensed_700Bold_Italic|!SofiaSansExtraCondensed_800ExtraBold_Italic|!SofiaSansExtraCondensed_900Black_Italic||
If you are trying out lots of different fonts, you can try using the @expo-google-fonts/dev package.
You can import _any_ font style from any Expo Google Fonts package from it. It will load the fonts over the network at runtime instead of adding the asset as a file to your project, so it may take longer for your app to get to interactivity at startup, but it is extremely convenient for playing around with any style that you want.
The @expo-google-fonts/sofia-sans-extra-condensed package and its code are released under the MIT license.
All the fonts in the Google Fonts catalog are free and open source.
Check the Sofia Sans Extra Condensed page on Google Fonts for the specific license of this font family.
You can use these fonts freely in your products & projects - print or digital, commercial or otherwise. However, you can't sell the fonts on their own. This isn't legal advice, please consider consulting a lawyer and see the full license for all details.
- Sofia Sans Extra Condensed on Google Fonts
- Google Fonts
- This package on npm
- This package on GitHub
- The Expo Google Fonts project on GitHub
- @expo-google-fonts/dev` Devlopment Package
Contributions are very welcome! This entire directory, including what you are reading now, was generated from code. Instead of submitting PRs to this directly, please make contributions to the generator instead.