Archived topic
Different font rendering on desktop and mobile
6 replies · Started by Alessandro on March 30, 2021
A question,
why is the font of the titles rendered differently on Desktop and on Mobile?
I use the Google font: Barlow condensed 700
attached a screenshot of the differences.
What could I do to make it look like?
In the mobile version there seems to be a space between the characters and the font appears with little bold.
I use Google Chrome on my desktop (iMac) and on my smartphone (iPhone 7).
Thanks
Alessandro
Is it possible that this code on functions.php doesen't work?
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'barlow_condensed' ] = array(
'name' => 'Barlow Condensed',
'variants' => array( '400','700' ),
'category' => 'sans-serif'
);
$fonts[ 'assistant' ] = array(
'name' => 'Assistant',
'variants' => array( '400','700' ),
'category' => 'sans-serif'
);
return $fonts;
}
add_filter( 'generate_google_font_display', function() {
return 'swap';
} );
Hi there,
try just adding the font - without the array/variants as per the example here:
https://docs.generatepress.com/article/generate_typography_default_fonts/#example
Then you can deselect the variants you don't require in the Customizer Typography settings.
Nothing changes, but I noticed that the "Barlow Condensed" font is now available directly without including it in functions.php
Unfortunately, nothing has changed on the mobile rendering side, the font appears more spaced than the desktop version.
I'm not seeing the more spaced version on mobile on my end, but I'm not seeing it loading the 700 variant, either.
Is 700 a choice in the variants in the Customizer for you? If so, is it selected?
ok thanks anyway for the support.
It is available in customize.
Were you able to resolve this? :)