Closed jgudo closed 2 years ago
Finally found the solution. Turns out, I must specify the fontWeight
of the category
"appearances": {
"default": {
"variantGroups": {
"category": {
"h1": {
"fontFamily": "ProductSans-Bold",
"fontWeight": "600"
}
...
}
}
}
}
@jgudo How did you discover the correct format for custom mapping? Are there TypeScript definitions, or a schema somewhere?
@isaachinman You can look up at the main mapping source file in node_modules/@eva-design/eva/mapping.json
From there you can copy-paste the component mapping you would like to modify.
💬 Question
Custom mapping of fonts are not applying to only heading categories (h1-h6). I'm not sure whether this is a misconfiguration on my custom mapping. Could you help me out on this configuration? I'm having hard time trying to wrap my ahead round custom mappings documentation.
UI Kitten and Eva version
This is what my
mapping.json
file looks like:When I use the
Text
component and use certain category, only heading categories do not apply the custom font while other categories works.To give you a snapshot of the issue, this is what is looks like when I run it on my device:
As you can see, all the heading categories are not using the custom font from the mapping and only uses the
System
font in this case which isSamsungOne
font that is currently set on my device. I am usingSFPro
font andProductSans
font. I have tried different fonts but problem still exists.