Announcement

Collapse
No announcement yet.

Adding custom font to forum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Glenn Vergara
    replied
    Glad to help

    I discovered and filed 2 issues while finding out a solution to this.

    http://tracker.vbulletin.com/browse/VBV-16486
    http://tracker.vbulletin.com/browse/VBV-16485

    If those 2 are implemented, then adding a custom font will just require editing config.js and css_additional.css template.

    Leave a comment:


  • Calamity
    replied
    Awesome!! I'm checking it out right now. Very nice job, man!

    Leave a comment:


  • Glenn Vergara
    replied
    I figured it out! The custom config.js file is not being loaded because by default vB sets customConfig property for the ckeditor config to an empty string which tells ckeditor to ignore the custom config file.

    I have documented the complete steps to follow to add custom font on my site.

    http://vbmods.rocks/forum/vbulletin-...in-vbulletin-5

    Leave a comment:


  • Calamity
    replied
    I removed those two lines from the config now, cleared my cache and checked if it would load config.js now, but nope... The results are still the same. It does however load up this: "js/ckeditor-rollup-523.js", but no other ckeditor related files it seems.

    Leave a comment:


  • Calamity
    replied
    Thanks, Glenn! Best of luck trying to figure it out.

    Leave a comment:


  • Glenn Vergara
    replied
    I tried what you did and it's also not working. It seems that config.js is not being loaded. I will let you know if I figure it out.

    Leave a comment:


  • Calamity
    replied
    Glenn VergaraI still haven't solved this issue. I haven't really been looking too much into it yet, as I've been busy. I'm not sure if the problem is with my css (the font still works using HTML and BB codes), or if it's the code I added to the ckeditor config.

    Leave a comment:


  • Calamity
    replied
    No worries! Appreciate the help, man.

    Leave a comment:


  • Glenn Vergara
    replied
    I'm just on my phone at the moment. I'll take a look on my desktop when I get a chance if no one has helped you yet.

    Leave a comment:


  • Calamity
    replied
    Hi Glenn,

    For some reason it's not working. I added the following code to my config.js inside /js/ckeditor (before the last closing bracket):

    Code:
    config.contentsCss = 'fonts.css';
    config.font_names = 'Century Gothic/centurygothic;' + config.font_names;
    And my fonts.css:
    Code:
    @font-face {
            font-family: 'centurygothic';
            src: url('fonts/centurygothic/century-gothic.ttf');
            font-weight: normal;
            font-style: normal;
        }
    EDIT: Yes, I've cleared my browser cache + purged cache on CloudFlare - no results.
    Also, I did change it to "css_fonts.css", but that made no difference.
    Last edited by Calamity; Mon 5th Sep '16, 1:30pm.

    Leave a comment:


  • Glenn Vergara
    replied
    Google for "add font in ckeditor". Ckeditor is the third-party editor that vB is using. You might have to modify ckeditor js files to add new font.

    Leave a comment:


  • Calamity
    started a topic Adding custom font to forum

    Adding custom font to forum

    Hello,

    I would like to add a font called Century Gothic as a usable font when posting threads on my forum. I have it addedd to the css_fonts.css file, as well as added it to the font family in the "body_font" template. I've tested it using HTML codes, and the font displays just fine. However, I'm unable to select it in the "Fonts"-dropdown, it's not there.

    Thanks.
    Last edited by Calamity; Sun 4th Sep '16, 7:42pm. Reason: silly typo.

Related Topics

Collapse

Working...
X