You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey! using dripsy with solito - I've followed the guide in the docs to get custom fonts setup, and it's (mostly) working really nicely. I've got one instance where it's not working though, and I can't work out why...
The reason for these modifiers is because I couldn't work out another way of defining each fontface via CSS in the next app with the same name (Work Sans) but then being able to get the native app to pick up these different font files based on the weight. anyway, this is all groovy, and I've got e.g.
<Text
variant="button"
sx={{
textAlign: 'center',
}}
>
Should be Work Sans Medium!
</Text>
it renders Work Sans Medium on native, but it renders Work Sans Regular on web...in the inspector the font family is Work Sans and the font weight is 400.
I even tried this:
<Text
variant="button"
sx={{
fontWeight: '500',
textAlign: 'center',
}}
>
Should be Work Sans Medium!
</Text>
which had no effect. the only thing i could do to get it to render the medium font was this
<Text
variant="button"
// not working without this and i have no idea why...
style={{ fontWeight: '500' }}
sx={{
textAlign: 'center',
}}
>
Should be Work Sans Medium!
</Text>
have you seen this before / do you have any idea why this might be? thanks so much in advance!
The text was updated successfully, but these errors were encountered:
yeah I think we’re missing the font-face code on Web. I’ll try to add that when I get the chance. You just have to use font face CSS in _document, make every font normal weight and name it after its font file.
Just today I've noticed +/- the same issue in a different context... on web, when fallback fonts are used before loading the custom font.
Missing the css style font-weight (especially 900) made it look very different and the moment the proper font loaded, it was quite a "bold blink" 😅 ... so transforming fontWeight into font-family should not remove it, but have both.
Anyway, thank you for adding this on your todo-list 👍
hey! using dripsy with solito - I've followed the guide in the docs to get custom fonts setup, and it's (mostly) working really nicely. I've got one instance where it's not working though, and I can't work out why...
in my theme file I've got:
The reason for these modifiers is because I couldn't work out another way of defining each fontface via CSS in the next app with the same name (
Work Sans
) but then being able to get the native app to pick up these different font files based on the weight. anyway, this is all groovy, and I've got e.g.working perfectly with H3s -> it renders Work Sans SemiBold both on the web and native app. however, defining a text variant like this:
and using it like this
it renders
Work Sans Medium
on native, but it rendersWork Sans Regular
on web...in the inspector the font family isWork Sans
and the font weight is400
.I even tried this:
which had no effect. the only thing i could do to get it to render the medium font was this
have you seen this before / do you have any idea why this might be? thanks so much in advance!
The text was updated successfully, but these errors were encountered: