WordPress.org

Ready to get started?Download WordPress

Forums

Google Webfonts For Woo Framework
[resolved] Adds fonts to tyography section but not shortcode section. (7 posts)

  1. dreadedhamish
    Member
    Posted 10 months ago #

    I'm running the latest woo framework on Mystile and 3.6 beta.

    I've added the plugin and it worked to import all the new Google fonts into the typography section. BUT these new fonts are not in the shortcode section whatever it's called - on a post, click the woo icon > typography > Custom Typography. You then get to a pop-up where you insert your text and choose the font, but none of the new fonts are there (and they aren't alphabetical which is painful)

    My test font is Niccone - I can now select it in the typography section of Woo options, but it's not there for custom typography using a shortcode.

    Cheers,
    Hamish

    http://wordpress.org/extend/plugins/google-fonts-for-woo-framework/

  2. Jason Judge
    Member
    Plugin Author

    Posted 10 months ago #

    Many apologies - I didn't get a notification about this, so I had no idea you had posted.

    I promised myself that I would be giving this plugin a few additional features, so I'll add this to my list to fix. Give me a couple of days and I'll see what I can do.

    The alphabetic ordering has always been done by the Woo framework in the typography section. My plugin doesn't sort the fonts at all. If it will help the GUI editor typography list (which I did not even know was in there - in fact, it is not working at all in my installations. no pop-up) then perhaps I should revise that idea.

    -- Jason

  3. Jason Judge
    Member
    Plugin Author

    Posted 10 months ago #

    I can see the page you mean now, looking at another site. I'm not sure why it works for some sites and not for others. That's why I missed it.

  4. Jason Judge
    Member
    Plugin Author

    Posted 9 months ago #

    Managed to take a look at this, and am narrowing down to how this is happening.

    The list of fonts in the short-code insertion comes from canvas/functions/js/shortcode-generator/js/dialog-js.php

    This script supplies the built-in list of fonts that the Woo Framework has hard-coded inside canvas/functions/admin-functions.php, and in the order in which they are listed there (which is not alphabetic order).

    I just need to find a hook that will squeeze in earlier enough to modify that list before the dialog-js.php script runs.

    Obviously these details won't help you until this is fixed, but you might be interested in how this is going.

    The next release of this plugin will also have the latest list of Google Webfonts built in (in a data file) and will work immediately without a google API key. You will still need the key to get even more fonts and variations as they are released, but this should help people who don't want to go to that hassle.

  5. Jason Judge
    Member
    Plugin Author

    Posted 9 months ago #

    It looks like this is not going to be possible. On the plus side, the order of the fonts that *are* displayed in the typography short-code drop-down can be fixed with a single line of code in dialog-js-.php

    However, that script bypasses all the normal page-load stuff that WordPress does, including the loading of any installed plugins. It does not call up any hooks or filters, so there is no place to hook in and update the list of fonts before it is delivered to the browser as a JavaScript file.

    What I would suggest trying, is inserting the short-code for any other random font, then manually changing the font name in the short-code to your desired Google font. I have not tried that yet, but if the short-code is working properly, it should load up the font into tha page at run-time and work. You can get the full font names from the settings page of this plugin.

    Edit: yes it does work. I inserted this into a page:

    [typography font="Cantarell" size="24" size_format="px"]Test typography[/typography]

    then changed it to this:

    [typography font="Herr Von Muellerhoff" size="24" size_format="px"]Test typography[/typography]

    and got the desired cursive font.

    So in conclusion: you can use any Google Webfont for any text in any page or post. You cannot select from all available fonts in the Woothemes short-code generator, at least not without some changes to the core Woo Framework, which is out of my hands.

  6. dreadedhamish
    Member
    Posted 9 months ago #

    Thanks,
    I thought of the same thing - adding a random and changing it. Thanks for the hard work!

  7. Jason Judge
    Member
    Plugin Author

    Posted 9 months ago #

    I'll mark this as resolved, as a permanent fix is out of my hands, and I don't have access to the Woo Framework repository to be able to generate a pull-request. The issue should be raised with WooThemes.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.