Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GSkeleton2
#12
(2014-12-21, 00:26:12)hameau Wrote:
(2014-12-20, 22:15:58)Timbow Wrote: I just went to the link and copied what I found there but it turns out that link returns different declarations for different browsers so no wonder it only works in chrome.

CKEditor v3.x seems to only accept .ttf fonts. It works if the font file is provided by:
- include Raleway-Regular.ttf in the (e.g.) css folder;
- add this near the top of editor.css
Code:
@font-face {
    font-family: 'Raleway';
    src: url('css/Raleway-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

Limitations: editor doesn't show different font weights (e.g., bold, etc.). Don't know how to work around that as the @font-face rule includes the weight.

(2014-12-20, 22:15:58)Timbow Wrote: A plugin to allow google fonts in the editor?

There seems to be a nascent CKE v4 plugin to add Google fonts. (IMO, the editor is where the plugin belongs, not in GS.)

For many reasons, I prefer to host the fonts on the website, rather than pulling them from a third-party, so I'm happy to carry on with my method for the time being. It isn't worth doing too much for CKE v3, as v4 in GS is just around the corner ... ;-)

Incidentally, the Raleway font has an open licence (SIL), so it could be redistributed with a theme. The .ttf file is 90k in size (from the Font Squirrel generator), but could probably be reduced by sub-setting.

You are total right I know. It has got to be more reliable to include the font in the theme.
Reply


Messages In This Thread
GSkeleton2 - by Timbow - 2014-12-16, 05:06:23
RE: GSkeleton2 - by datiswous - 2014-12-16, 07:15:19
RE: GSkeleton2 - by Timbow - 2014-12-16, 07:47:55
RE: GSkeleton2 - by datiswous - 2014-12-17, 00:19:00
RE: GSkeleton2 - by hameau - 2014-12-17, 22:08:45
RE: GSkeleton2 - by Timbow - 2014-12-18, 00:46:43
RE: GSkeleton2 - by hameau - 2014-12-16, 20:02:14
RE: GSkeleton2 - by skyblue12 - 2014-12-17, 01:13:35
RE: GSkeleton2 - by shawn_a - 2014-12-18, 01:15:24
RE: GSkeleton2 - by Timbow - 2014-12-20, 22:15:58
RE: GSkeleton2 - by hameau - 2014-12-21, 00:26:12
RE: GSkeleton2 - by Timbow - 2014-12-21, 02:00:36
RE: GSkeleton2 - by Timbow - 2015-04-08, 08:58:59
RE: GSkeleton2 - by shawn_a - 2015-04-08, 10:32:42
RE: GSkeleton2 - by hameau - 2015-04-10, 02:25:27
RE: GSkeleton2 - by Timbow - 2015-04-08, 17:57:13
RE: GSkeleton2 - by Timbow - 2015-10-26, 01:45:37



Users browsing this thread: 1 Guest(s)