@expo-google-fonts/google-sans 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/400Regular/GoogleSans_400Regular.ttf +0 -0
- package/400Regular/GoogleSans_400Regular.ttf.png +0 -0
- package/400Regular/index.d.ts +5 -0
- package/400Regular/index.js +4 -0
- package/400Regular_Italic/GoogleSans_400Regular_Italic.ttf +0 -0
- package/400Regular_Italic/GoogleSans_400Regular_Italic.ttf.png +0 -0
- package/400Regular_Italic/index.d.ts +5 -0
- package/400Regular_Italic/index.js +4 -0
- package/500Medium/GoogleSans_500Medium.ttf +0 -0
- package/500Medium/GoogleSans_500Medium.ttf.png +0 -0
- package/500Medium/index.d.ts +5 -0
- package/500Medium/index.js +4 -0
- package/500Medium_Italic/GoogleSans_500Medium_Italic.ttf +0 -0
- package/500Medium_Italic/GoogleSans_500Medium_Italic.ttf.png +0 -0
- package/500Medium_Italic/index.d.ts +5 -0
- package/500Medium_Italic/index.js +4 -0
- package/600SemiBold/GoogleSans_600SemiBold.ttf +0 -0
- package/600SemiBold/GoogleSans_600SemiBold.ttf.png +0 -0
- package/600SemiBold/index.d.ts +5 -0
- package/600SemiBold/index.js +4 -0
- package/600SemiBold_Italic/GoogleSans_600SemiBold_Italic.ttf +0 -0
- package/600SemiBold_Italic/GoogleSans_600SemiBold_Italic.ttf.png +0 -0
- package/600SemiBold_Italic/index.d.ts +5 -0
- package/600SemiBold_Italic/index.js +4 -0
- package/700Bold/GoogleSans_700Bold.ttf +0 -0
- package/700Bold/GoogleSans_700Bold.ttf.png +0 -0
- package/700Bold/index.d.ts +5 -0
- package/700Bold/index.js +4 -0
- package/700Bold_Italic/GoogleSans_700Bold_Italic.ttf +0 -0
- package/700Bold_Italic/GoogleSans_700Bold_Italic.ttf.png +0 -0
- package/700Bold_Italic/index.d.ts +5 -0
- package/700Bold_Italic/index.js +4 -0
- package/LICENSE +21 -0
- package/LICENSE_FONT +91 -0
- package/README.md +176 -0
- package/font-family.png +0 -0
- package/index.d.ts +13 -0
- package/index.js +13 -0
- package/metadata.json +46 -0
- package/package.json +17 -0
- package/useFonts.d.ts +15 -0
- package/useFonts.js +25 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/700Bold/index.js
ADDED
|
Binary file
|
|
Binary file
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Expo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/LICENSE_FONT
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
2
|
+
This license is copied below, and is also available with a FAQ at:
|
|
3
|
+
https://openfontlicense.org
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
-----------------------------------------------------------
|
|
7
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
PREAMBLE
|
|
11
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
12
|
+
development of collaborative font projects, to support the font creation
|
|
13
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
14
|
+
open framework in which fonts may be shared and improved in partnership
|
|
15
|
+
with others.
|
|
16
|
+
|
|
17
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
18
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
19
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
20
|
+
redistributed and/or sold with any software provided that any reserved
|
|
21
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
22
|
+
however, cannot be released under any other type of license. The
|
|
23
|
+
requirement for fonts to remain under this license does not apply
|
|
24
|
+
to any document created using the fonts or their derivatives.
|
|
25
|
+
|
|
26
|
+
DEFINITIONS
|
|
27
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
28
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
29
|
+
include source files, build scripts and documentation.
|
|
30
|
+
|
|
31
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
32
|
+
copyright statement(s).
|
|
33
|
+
|
|
34
|
+
"Original Version" refers to the collection of Font Software components as
|
|
35
|
+
distributed by the Copyright Holder(s).
|
|
36
|
+
|
|
37
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
38
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
39
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
40
|
+
new environment.
|
|
41
|
+
|
|
42
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
43
|
+
writer or other person who contributed to the Font Software.
|
|
44
|
+
|
|
45
|
+
PERMISSION & CONDITIONS
|
|
46
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
47
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
48
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
49
|
+
Software, subject to the following conditions:
|
|
50
|
+
|
|
51
|
+
1) Neither the Font Software nor any of its individual components,
|
|
52
|
+
in Original or Modified Versions, may be sold by itself.
|
|
53
|
+
|
|
54
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
55
|
+
redistributed and/or sold with any software, provided that each copy
|
|
56
|
+
contains the above copyright notice and this license. These can be
|
|
57
|
+
included either as stand-alone text files, human-readable headers or
|
|
58
|
+
in the appropriate machine-readable metadata fields within text or
|
|
59
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
60
|
+
|
|
61
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
62
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
63
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
64
|
+
presented to the users.
|
|
65
|
+
|
|
66
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
67
|
+
Software shall not be used to promote, endorse or advertise any
|
|
68
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
69
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
70
|
+
permission.
|
|
71
|
+
|
|
72
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
73
|
+
must be distributed entirely under this license, and must not be
|
|
74
|
+
distributed under any other license. The requirement for fonts to
|
|
75
|
+
remain under this license does not apply to any document created
|
|
76
|
+
using the Font Software.
|
|
77
|
+
|
|
78
|
+
TERMINATION
|
|
79
|
+
This license becomes null and void if any of the above conditions are
|
|
80
|
+
not met.
|
|
81
|
+
|
|
82
|
+
DISCLAIMER
|
|
83
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
84
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
85
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
86
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
87
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
88
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
89
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
90
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
91
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# @expo-google-fonts/google-sans
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
This package lets you use the [**Google Sans**](https://fonts.google.com/specimen/Google+Sans) font family from [Google Fonts](https://fonts.google.com/) in your Expo app.
|
|
9
|
+
|
|
10
|
+
## Google Sans
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
This font family contains [8 styles](#-gallery).
|
|
15
|
+
|
|
16
|
+
- `GoogleSans_400Regular`
|
|
17
|
+
- `GoogleSans_500Medium`
|
|
18
|
+
- `GoogleSans_600SemiBold`
|
|
19
|
+
- `GoogleSans_700Bold`
|
|
20
|
+
- `GoogleSans_400Regular_Italic`
|
|
21
|
+
- `GoogleSans_500Medium_Italic`
|
|
22
|
+
- `GoogleSans_600SemiBold_Italic`
|
|
23
|
+
- `GoogleSans_700Bold_Italic`
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
Run this command from the shell in the root directory of your Expo project to add the font family package to your project
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npx expo install @expo-google-fonts/google-sans expo-font
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Now add code like this to your project
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import { Text, View } from "react-native";
|
|
37
|
+
import { useFonts } from '@expo-google-fonts/google-sans/useFonts';
|
|
38
|
+
import { GoogleSans_400Regular } from '@expo-google-fonts/google-sans/400Regular';
|
|
39
|
+
import { GoogleSans_500Medium } from '@expo-google-fonts/google-sans/500Medium';
|
|
40
|
+
import { GoogleSans_600SemiBold } from '@expo-google-fonts/google-sans/600SemiBold';
|
|
41
|
+
import { GoogleSans_700Bold } from '@expo-google-fonts/google-sans/700Bold';
|
|
42
|
+
import { GoogleSans_400Regular_Italic } from '@expo-google-fonts/google-sans/400Regular_Italic';
|
|
43
|
+
import { GoogleSans_500Medium_Italic } from '@expo-google-fonts/google-sans/500Medium_Italic';
|
|
44
|
+
import { GoogleSans_600SemiBold_Italic } from '@expo-google-fonts/google-sans/600SemiBold_Italic';
|
|
45
|
+
import { GoogleSans_700Bold_Italic } from '@expo-google-fonts/google-sans/700Bold_Italic';
|
|
46
|
+
|
|
47
|
+
export default () => {
|
|
48
|
+
|
|
49
|
+
let [fontsLoaded] = useFonts({
|
|
50
|
+
GoogleSans_400Regular,
|
|
51
|
+
GoogleSans_500Medium,
|
|
52
|
+
GoogleSans_600SemiBold,
|
|
53
|
+
GoogleSans_700Bold,
|
|
54
|
+
GoogleSans_400Regular_Italic,
|
|
55
|
+
GoogleSans_500Medium_Italic,
|
|
56
|
+
GoogleSans_600SemiBold_Italic,
|
|
57
|
+
GoogleSans_700Bold_Italic
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
let fontSize = 24;
|
|
61
|
+
let paddingVertical = 6;
|
|
62
|
+
|
|
63
|
+
if (!fontsLoaded) {
|
|
64
|
+
return null;
|
|
65
|
+
} else {
|
|
66
|
+
return (
|
|
67
|
+
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
|
|
68
|
+
<Text style={{
|
|
69
|
+
fontSize,
|
|
70
|
+
paddingVertical,
|
|
71
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
72
|
+
fontFamily: "GoogleSans_400Regular"
|
|
73
|
+
}}>
|
|
74
|
+
Google Sans Regular
|
|
75
|
+
</Text>
|
|
76
|
+
<Text style={{
|
|
77
|
+
fontSize,
|
|
78
|
+
paddingVertical,
|
|
79
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
80
|
+
fontFamily: "GoogleSans_500Medium"
|
|
81
|
+
}}>
|
|
82
|
+
Google Sans Medium
|
|
83
|
+
</Text>
|
|
84
|
+
<Text style={{
|
|
85
|
+
fontSize,
|
|
86
|
+
paddingVertical,
|
|
87
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
88
|
+
fontFamily: "GoogleSans_600SemiBold"
|
|
89
|
+
}}>
|
|
90
|
+
Google Sans Semi Bold
|
|
91
|
+
</Text>
|
|
92
|
+
<Text style={{
|
|
93
|
+
fontSize,
|
|
94
|
+
paddingVertical,
|
|
95
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
96
|
+
fontFamily: "GoogleSans_700Bold"
|
|
97
|
+
}}>
|
|
98
|
+
Google Sans Bold
|
|
99
|
+
</Text>
|
|
100
|
+
<Text style={{
|
|
101
|
+
fontSize,
|
|
102
|
+
paddingVertical,
|
|
103
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
104
|
+
fontFamily: "GoogleSans_400Regular_Italic"
|
|
105
|
+
}}>
|
|
106
|
+
Google Sans Italic
|
|
107
|
+
</Text>
|
|
108
|
+
<Text style={{
|
|
109
|
+
fontSize,
|
|
110
|
+
paddingVertical,
|
|
111
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
112
|
+
fontFamily: "GoogleSans_500Medium_Italic"
|
|
113
|
+
}}>
|
|
114
|
+
Google Sans Medium Italic
|
|
115
|
+
</Text>
|
|
116
|
+
<Text style={{
|
|
117
|
+
fontSize,
|
|
118
|
+
paddingVertical,
|
|
119
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
120
|
+
fontFamily: "GoogleSans_600SemiBold_Italic"
|
|
121
|
+
}}>
|
|
122
|
+
Google Sans Semi Bold Italic
|
|
123
|
+
</Text>
|
|
124
|
+
<Text style={{
|
|
125
|
+
fontSize,
|
|
126
|
+
paddingVertical,
|
|
127
|
+
// Note the quoting of the value for `fontFamily` here; it expects a string!
|
|
128
|
+
fontFamily: "GoogleSans_700Bold_Italic"
|
|
129
|
+
}}>
|
|
130
|
+
Google Sans Bold Italic
|
|
131
|
+
</Text>
|
|
132
|
+
</View>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## 🔡 Gallery
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
||||
|
|
142
|
+
|-|-|-|
|
|
143
|
+
|||||
|
|
144
|
+
|||||
|
|
145
|
+
|||||
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## 👩💻 Use During Development
|
|
149
|
+
|
|
150
|
+
If you are trying out lots of different fonts, you can try using the [`@expo-google-fonts/dev` package](https://github.com/expo/google-fonts/tree/master/font-packages/dev#readme).
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## 📖 License
|
|
156
|
+
|
|
157
|
+
The `@expo-google-fonts/google-sans` package and its code are released under the MIT license.
|
|
158
|
+
|
|
159
|
+
All the fonts in the Google Fonts catalog are free and open source.
|
|
160
|
+
|
|
161
|
+
Check the [Google Sans page on Google Fonts](https://fonts.google.com/specimen/Google+Sans) for the specific license of this font family.
|
|
162
|
+
|
|
163
|
+
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.
|
|
164
|
+
|
|
165
|
+
## 🔗 Links
|
|
166
|
+
|
|
167
|
+
- [Google Sans on Google Fonts](https://fonts.google.com/specimen/Google+Sans)
|
|
168
|
+
- [Google Fonts](https://fonts.google.com/)
|
|
169
|
+
- [This package on npm](https://www.npmjs.com/package/@expo-google-fonts/google-sans)
|
|
170
|
+
- [This package on GitHub](https://github.com/expo/google-fonts/tree/master/font-packages/google-sans)
|
|
171
|
+
- [The Expo Google Fonts project on GitHub](https://github.com/expo/google-fonts)
|
|
172
|
+
- [`@expo-google-fonts/dev` Devlopment Package](https://github.com/expo/google-fonts/tree/master/font-packages/dev)
|
|
173
|
+
|
|
174
|
+
## 🤝 Contributing
|
|
175
|
+
|
|
176
|
+
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](https://github.com/expo/google-fonts/tree/master/packages/generator) instead.
|
package/font-family.png
ADDED
|
Binary file
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is generated by @expo-google-fonts/generator
|
|
2
|
+
// If you want to modify it, go to packages/generator/templates
|
|
3
|
+
|
|
4
|
+
export * from './useFonts';
|
|
5
|
+
export const __metadata__: any;
|
|
6
|
+
export const GoogleSans_400Regular: number;
|
|
7
|
+
export const GoogleSans_500Medium: number;
|
|
8
|
+
export const GoogleSans_600SemiBold: number;
|
|
9
|
+
export const GoogleSans_700Bold: number;
|
|
10
|
+
export const GoogleSans_400Regular_Italic: number;
|
|
11
|
+
export const GoogleSans_500Medium_Italic: number;
|
|
12
|
+
export const GoogleSans_600SemiBold_Italic: number;
|
|
13
|
+
export const GoogleSans_700Bold_Italic: number;
|
package/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is generated by @expo-google-fonts/generator
|
|
2
|
+
// If you want to modify it, go to packages/generator/templates
|
|
3
|
+
|
|
4
|
+
export * from './useFonts';
|
|
5
|
+
export { default as __metadata__ } from './metadata.json';
|
|
6
|
+
export const GoogleSans_400Regular = require('./400Regular/GoogleSans_400Regular.ttf');
|
|
7
|
+
export const GoogleSans_500Medium = require('./500Medium/GoogleSans_500Medium.ttf');
|
|
8
|
+
export const GoogleSans_600SemiBold = require('./600SemiBold/GoogleSans_600SemiBold.ttf');
|
|
9
|
+
export const GoogleSans_700Bold = require('./700Bold/GoogleSans_700Bold.ttf');
|
|
10
|
+
export const GoogleSans_400Regular_Italic = require('./400Regular_Italic/GoogleSans_400Regular_Italic.ttf');
|
|
11
|
+
export const GoogleSans_500Medium_Italic = require('./500Medium_Italic/GoogleSans_500Medium_Italic.ttf');
|
|
12
|
+
export const GoogleSans_600SemiBold_Italic = require('./600SemiBold_Italic/GoogleSans_600SemiBold_Italic.ttf');
|
|
13
|
+
export const GoogleSans_700Bold_Italic = require('./700Bold_Italic/GoogleSans_700Bold_Italic.ttf');
|
package/metadata.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"family": "Google Sans",
|
|
3
|
+
"variants": ["regular", "500", "600", "700", "italic", "500italic", "600italic", "700italic"],
|
|
4
|
+
"subsets": [
|
|
5
|
+
"armenian",
|
|
6
|
+
"bengali",
|
|
7
|
+
"canadian-aboriginal",
|
|
8
|
+
"cyrillic",
|
|
9
|
+
"cyrillic-ext",
|
|
10
|
+
"devanagari",
|
|
11
|
+
"ethiopic",
|
|
12
|
+
"georgian",
|
|
13
|
+
"greek",
|
|
14
|
+
"greek-ext",
|
|
15
|
+
"gujarati",
|
|
16
|
+
"gurmukhi",
|
|
17
|
+
"hebrew",
|
|
18
|
+
"khmer",
|
|
19
|
+
"lao",
|
|
20
|
+
"latin",
|
|
21
|
+
"latin-ext",
|
|
22
|
+
"malayalam",
|
|
23
|
+
"oriya",
|
|
24
|
+
"sinhala",
|
|
25
|
+
"symbols",
|
|
26
|
+
"tamil",
|
|
27
|
+
"telugu",
|
|
28
|
+
"thai",
|
|
29
|
+
"vietnamese"
|
|
30
|
+
],
|
|
31
|
+
"version": "v67",
|
|
32
|
+
"lastModified": "2025-12-10",
|
|
33
|
+
"files": {
|
|
34
|
+
"500": "https://fonts.gstatic.com/s/googlesans/v67/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrw2IKlirSjiEjo5.ttf",
|
|
35
|
+
"600": "https://fonts.gstatic.com/s/googlesans/v67/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrzaJ6lirSjiEjo5.ttf",
|
|
36
|
+
"700": "https://fonts.gstatic.com/s/googlesans/v67/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrzjJ6lirSjiEjo5.ttf",
|
|
37
|
+
"regular": "https://fonts.gstatic.com/s/googlesans/v67/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrwEIKlirSjiEjo5.ttf",
|
|
38
|
+
"italic": "https://fonts.gstatic.com/s/googlesans/v67/4Ua9rENHsxJlGDuGo1OIlL3L2JB874GPhFI9_IqmuRqGpjeaLi42kO8QvnQOs5beU3yksanMY0EhpyzAFyo5T4o.ttf",
|
|
39
|
+
"500italic": "https://fonts.gstatic.com/s/googlesans/v67/4Ua9rENHsxJlGDuGo1OIlL3L2JB874GPhFI9_IqmuRqGpjeaLi42kO8QvnQOs5beU3yksanMY3MhpyzAFyo5T4o.ttf",
|
|
40
|
+
"600italic": "https://fonts.gstatic.com/s/googlesans/v67/4Ua9rENHsxJlGDuGo1OIlL3L2JB874GPhFI9_IqmuRqGpjeaLi42kO8QvnQOs5beU3yksanMY58mpyzAFyo5T4o.ttf",
|
|
41
|
+
"700italic": "https://fonts.gstatic.com/s/googlesans/v67/4Ua9rENHsxJlGDuGo1OIlL3L2JB874GPhFI9_IqmuRqGpjeaLi42kO8QvnQOs5beU3yksanMY6YmpyzAFyo5T4o.ttf"
|
|
42
|
+
},
|
|
43
|
+
"category": "sans-serif",
|
|
44
|
+
"kind": "webfonts#webfont",
|
|
45
|
+
"menu": "https://fonts.gstatic.com/s/googlesans/v67/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrwEIJljpyw.ttf"
|
|
46
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@expo-google-fonts/google-sans",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Use the Google Sans font family from Google Fonts in your Expo app",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/expo/google-fonts.git",
|
|
9
|
+
"directory": "font-packages/google-sans"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/expo/google-fonts/tree/master/font-packages/google-sans#readme",
|
|
12
|
+
"author": "Expo Team <team@expo.io>",
|
|
13
|
+
"license": "MIT AND OFL-1.1",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/useFonts.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type FontSource = string | number | Asset | FontResource;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Load a map of custom fonts to use in textual elements.
|
|
5
|
+
* The map keys are used as font names, and can be used with `fontFamily: <name>;`.
|
|
6
|
+
* It returns a boolean describing if all fonts are loaded.
|
|
7
|
+
*
|
|
8
|
+
* Note, the fonts are not "reloaded" when you dynamically change the font map.
|
|
9
|
+
*
|
|
10
|
+
* @see https://docs.expo.io/versions/latest/sdk/font/
|
|
11
|
+
* @example const [loaded, error] = useFonts(...);
|
|
12
|
+
*/
|
|
13
|
+
export function useFonts(
|
|
14
|
+
map: string | { [fontFamily: string]: FontSource }
|
|
15
|
+
): [boolean, Error | null];
|
package/useFonts.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { loadAsync } from 'expo-font';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Load a map of custom fonts to use in textual elements.
|
|
6
|
+
* The map keys are used as font names, and can be used with `fontFamily: <name>;`.
|
|
7
|
+
* It returns a boolean describing if all fonts are loaded.
|
|
8
|
+
*
|
|
9
|
+
* Note, the fonts are not "reloaded" when you dynamically change the font map.
|
|
10
|
+
*
|
|
11
|
+
* @see https://docs.expo.io/versions/latest/sdk/font/
|
|
12
|
+
* @example const [loaded, error] = useFonts(...);
|
|
13
|
+
*/
|
|
14
|
+
export function useFonts(map) {
|
|
15
|
+
const [loaded, setLoaded] = useState(false);
|
|
16
|
+
const [error, setError] = useState(null);
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
loadAsync(map)
|
|
20
|
+
.then(() => setLoaded(true))
|
|
21
|
+
.catch(setError);
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
return [loaded, error];
|
|
25
|
+
}
|