kontur / fontsampler-wordpress-plugin

A Wordpress plugin that let's users interactively preview and test webfonts
http://fontsampler.johannesneumeier.com
GNU General Public License v3.0
38 stars 8 forks source link

Font set being replaced by another when using multiple weights #145

Open wgalyall opened 6 years ago

wgalyall commented 6 years ago

I currently have x5 fontsets uploaded onto my site (http://williamlyall.co.uk/pm-grotesk) Thin, Light, Regular, Medium and Bold as individual fontsamplers to use. I specifically want them as individual boxes without the dropdown menu.

However the Regular weight of the typeface (what I am using for the labels on the fontsamplers) is always automatically replaced by the Bold weight — not sure why this is? The file is uploaded fine but I can't work out why it would be replaced with Bold.

patricking commented 6 years ago

this sounds like an issue i was having with a layered family of typefaces. all of them had the same weight that the CSS uses (they were all set to 500, simply because i forgot to change them)

in your font info, make sure there’s a different weight specified for each face in your family. so thin=250, light=300, reg=500, med=600, bold=700

(I think I remember those numbers are the defaults, they can change if you need to do so)

then re-upload your fonts, delete the old copies as well, delete your cache files from WP super cache if you’re using it, and then refresh your page. might do the trick.

wgalyall commented 6 years ago

Great thanks for the quick reply Patrick — that's worked!

Not sure I would have picked up on that so thanks for highlighting to me.

W

On Tue, May 29, 2018 at 6:24 PM, Patric King notifications@github.com wrote:

this sounds like an issue i was having with a layered family of typefaces. all of them had the same weight that the CSS uses (they were all set to 500, simply because i forgot to change them)

in your font info, make sure there’s a different weight specified for each face in your family. so thin=250, light=300, reg=500, med=600, bold=700

(I think I remember those numbers are the defaults, they can change if you need to do so)

then re-upload your fonts, delete the old copies as well, delete your cache files from WP super cache if you’re using it, and then refresh your page. might do the trick.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kontur/fontsampler-wordpress-plugin/issues/145#issuecomment-392864530, or mute the thread https://github.com/notifications/unsubscribe-auth/Al5m_k7A9H9xMu_-87XguY7cK65vT7J4ks5t3YRCgaJpZM4UR4J9 .

-- ✍

William Lyall Graphic Design

williamlyall.co.uk 12b.co.uk

@williamguyaagaardlyall @twelveb_

kontur commented 6 years ago

Thanks @patricking for sharing the advice, great that solved the issue.

There is generally a shortcoming in regard to using fonts that share PS Family name and weight where browsers "group" them as one. This is on my list of major to-do’s for this plugin, but requires hacking one of the underlying libraries. Ideally, I would like to completely disregard any (potentially faulty or contradictory) postscript info in the woff files and just overwrite them with the passed in font names as per #122.