• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Custom Fonts not Working in RH 2017

New Here ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

We license some fonts from myfonts.com for use in our Responsive HTML 5 help. The fonts are referenced in our main project .css and in the layout.css that controls the layout styles.

At the top of both .css files we must include the following @Import code before the @Blissful_help0D4E-face declaration for the custom fonts:

@Import url("//hello.myfonts.net/count/xxxxxx");

I believe this allows myfonts.com to track the number of page views that reference the font.

In RoboHelp 2015, the fonts displayed as expected in the Responsive HTML5 output. However, after generating the same output in the trial version of RH 2017, the fonts only display for styles defined in the layout.css (such as the TOC). The main topic content does not load the fonts as expected and falls back to Arial, which is the second font specified in font-family attributes in our main project .css.

In the Chrome dev console, there is an error message "Failed to Load resource: net:: " that references the @Import URL.

Any ideas what could have caused this issue in RH 2017?

Views

813

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

Probably something got busted in this new build - shoot tcssup@adobe.com an e-mail with examples.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

In addition, the update may have triggered a rewrite of the CSS by RoboHelp. Do you have an old version of the topic CSS lying around? Try restoring the CSS. Also, was the URL changed somehow (by RH in the code)?

Another thing to try: In the output, update the CSS so that it works. Then copy your changes back to the RH version of the CSS file and generate again. Does it still corrupt then?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

Thanks for the quick responses. I did send an email to Adobe Support.

I took Willam's advice and compared the .css source file in my RH2015 and RH2017 projects and found that some changes were made by RH when the project was upgraded:

- Some comments were removed from the start of the css file that seem to include myfonts license details.

- In the font-face declarations for our custom fonts, RH removed the single quote marks around the custom font names.

- The css file size increased from 14KB to 18KB

I replaced the .css file in my 2017 project with the original .css file from my 2015 project and regenerated the output, but the problem still remained. When I looked at the .css in the newly generated output, RH 2017 had made the same changes to the .css file during generation.

I then replaced the .css file in the 2017 output with the .css from my 2015 output, and the custom fonts finally appeared as expected.

So, I do have a workaround for now, but I'd prefer not to have to replace the css in the output every time I generate.

PS - I can share the css files with anyone who is interested in the exact changes that RH 2017 makes - don't want to post them here because they include licensing details specific to my company.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2017 Feb 14, 2017

Copy link to clipboard

Copied

While not ideal, many people copy in some content after generating the output. So while not ideal, it does work. In my ExtendScript webinar I showed how to create a script to automatically copy files from a template directory whenever you create an output. And the webinar also contains a sample script that you can use. Perhaps that will help: Getting Started with ExtendScript for RoboHelp 2015 – TechComm Central by Adobe

Also, for the CSS rewriting, I think it would be worthwhile to log a bug with Adobe about this: Tracker If you log the bug, Adobe can verify it and hopefully fix it as well. Don't forget to add your correct CSS as an attachment.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 14, 2017 Feb 14, 2017

Copy link to clipboard

Copied

LATEST

Thanks Willam, I logged the bug with Adobe. I'll check out the script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp