From progpapa via email:
I think I've managed to trace this down and it seems to be a minor issue in the fontyourface module:
1. To get all fonts on a page, functions use this:
$fonts = fontyourface_font_registry() + fontyourface_get_fonts();
(fontyourface_preprocess_html, fontyourface_generate_css)
2. fontyourface_font_registry() fills the $fonts array like this:
$fonts[$font->fid] = $font; // keyed by the font id
3. fontyourface_get_fonts fills the array like this:
$fonts[] = $result; // just adds an entry, key is most likely not the font id
4. This means that if you go to a font edit page (appearance/fontyourface/edit/%) and enter a css selector that applies to an element that appears on that page (e.g.:.fieldset-title), then both functions above will be called and chances are the font will appear twice in the $fonts array, so the same row appears twice in the font.css file.
I've attached a simple patch that fixes this.
Since this could only happen on the font edit page and on the preview page, I don't think it's a serious issue. Probably the only advantage would be is that the font.css file doesn't get regenerated because of the duplicate entries.
| Comment | File | Size | Author |
|---|---|---|---|
| patch1.txt | 425 bytes | sreynen |
Comments
Comment #1
Drave Robber commentedReproduced both the bug and the fix. Even if this is an edge case, it's always nice to have some consistency. :)
Comment #2
Drave Robber commentedThis has been committed to -dev.