[personal profile] jana posting in [community profile] style_system
Since the latest code push it's possible to embed web fonts in your stylesheet via the style wizard. What is the corresponding property if you want to set it in a theme layer? I'm working on a layout but don't use it as my journal style (which means I can't use the wizard).

Not sure this is what you wanted

Date: 2012-12-08 12:09 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
property string font_sources {
des = "Embedded fonts stylesheet URL";
note = "The URL must point to a font stylesheet such as 'http://fonts.googleapis.com/css?family=Average+Sans' and not directly at the font file. Embedded fonts can slow page loading time. Blank the field to stop using them.";
}

set font_sources = "";

Date: 2012-12-09 03:29 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Oh sorry, the property thing was just to show you how the property works. Btw, things you didn't ask about but that I'm gonna tell you anyway: all the properties you can use (i.e. the set things) can be found at http://www.dreamwidth.org/customize/advanced/layersource?id=550&fmt=html; they're generally sorted by category (Presentation, Colors, Fonts, etc.).

Can you check your code and make sure you don't have an extra '? Looking at the source code of your journal I see it's fetching http://cssproxy.dreamwidth.org/?u=http://fonts.googleapis.com/css%3Ffamily%3DAverage%2BSans%27 instead of http://cssproxy.dreamwidth.org/?u=http://fonts.googleapis.com/css%3Ffamily%3DAverage%2BSans

See? There's an extra %27 at the end of the URL.

The prop should be set like so:

set font_sources = "http://fonts.googleapis.com/css?family=Average+Sans";
Edited Date: 2012-12-09 03:31 pm (UTC)

Date: 2012-12-09 04:01 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Oh different issue entirely then. I see it's not fetching the stylesheet at all as if it wasn't using the prop. Could you make your layer(s) viewable and link me to them?

Date: 2012-12-09 06:03 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Sure but you linked me to the style, not the layers so I wouldn't know. :)

Date: 2012-12-10 07:33 pm (UTC)
ninetydegrees: Art: self-portrait (Default)
From: [personal profile] ninetydegrees
Thank you! So it doesn't work because set include_default_stylesheet is set to false. I'll have a look at the Core code and see if it that's normal or not.

Edit: looking at the comments on the bug, it seems this was done on purpose. I had initially put the option in a difference place but was asked to move it to another function (I don't know why though as I don't know how stylesheet inheritance and cleaning works).
Edited Date: 2012-12-10 07:47 pm (UTC)

Date: 2012-12-09 04:06 am (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori
set font_sources="http://url"; is the property to link an external sheet. You can also copy in the @font block from an external font style-sheet.

Profile

Dreamwidth style system discussion

July 2025

S M T W T F S
  123 45
6789101112
13141516171819
20212223242526
2728293031  

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 13th, 2025 04:58 am
Powered by Dreamwidth Studios