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
Basically, there was a mismatch between the file name in the local cache and the URL used as a replacement in the link.
I.e. The file was named kanit-v13-latin_latin-ext_thai_vietnamese-100.woff but the URL was kanit-v12-vietnamese_latin-ext_latin-regular.woff2, resulting in several 404 errors.
There were two different issues:
The "thai" subset was completely missing
It seems the order of the subsets in the two cases was not corresponding.
I was able to fix the issue with the following snippet thanks to the available filter:
// Fix to embed Kanit font via Embed Google Fonts plugin.
function bs_fix_embed_google_fonts_get_subsets( $subsets ) {
if ( ! in_array ( 'thai', $subsets ) ) {
$subsets[] = 'thai';
}
sort( $subsets );
return $subsets;
}
add_filter( 'embed_google_fonts_get_subsets', 'bs_fix_embed_google_fonts_get_subsets' );
However, it would be ideal to add 'thai' and reorder the subsets directly in the original plugin.
Thank you.
The text was updated successfully, but these errors were encountered:
Hi there,
thanks for this useful plugin. I have found a bug when using the Kanit font with the following enqueue:
Basically, there was a mismatch between the file name in the local cache and the URL used as a replacement in the link.
I.e. The file was named
kanit-v13-latin_latin-ext_thai_vietnamese-100.woff
but the URL waskanit-v12-vietnamese_latin-ext_latin-regular.woff2
, resulting in several 404 errors.There were two different issues:
I was able to fix the issue with the following snippet thanks to the available filter:
However, it would be ideal to add 'thai' and reorder the subsets directly in the original plugin.
Thank you.
The text was updated successfully, but these errors were encountered: