If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Custom Font Rendering in HTML Output

Started by JeremyAude, 16 Aug 2016 11:02:25 AM

Previous topic - Next topic

JeremyAude

Hi all,

I understand the concept that when adding custom fonts to Cognos that, unless the user has the fonts installed on their computer, these will not display in HTML report output.

To get around this we are trying to use an HTML item to reference the font library.  For instance:  HTML Item = <link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Roboto+Mono|Roboto+Slab" rel="stylesheet">

When running the report the font does render, but if the report is rerun (maybe by changing a prompt value on report page and resubmitting), the font is no longer displayed.  If you leave the report, return to Cognos Connection, then run the report again it behaves the same way - works first time but not after resubmitting.  It's as if the font reference is being stripped from the report upon resubmission.

Have any of you seen this behavior and possibly know of a workaround? 

TIA,
Jeremy

AnalyticsWithJay

I would suggest turning on Developer Tools (F12) in your browser and monitoring the "Network" tab. First verify what is happening the first run, and then document the differences on re-run. I would be curious to see what's happening here.

Have you tried referencing the HTML item using a Layout Component Reference? I wonder if you could avoid whatever caching is happening this way... Worth a try.

JeremyAude

I haven't tried either.  Let me give those a try and I'll let you know.

Thanks!

AnalyticsWithJay

Quote from: JeremyAude on 17 Aug 2016 12:36:06 PM
I haven't tried either.  Let me give those a try and I'll let you know.

Thanks!

Welcome. You might also want to select the option in Developer Tools to turn caching off while testing. That will help us narrow down the issue in case it's caching related.

bdbits

Some things to think about, maybe.
* Does this only happen when using in-line prompts?
* Does your HTML item persist in the pages source?
* Does this happen in all browsers?
* When in developer tools, I would inspect the item(s) that is supposed to be tagged with the custom font.

JeremyAude

Thanks for the responses.  Glad I checked as not getting email notifications for responses!

I opened a PMR with IBM and was told that web fonts are not supported.  There's an RFE for this same request:  http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=67521

I'm going to try your suggestions anyway and will let you know what I find.

Thanks again.

bdbits

Pushing the envelope is always interesting with Cognos.

Yes, do let us know what finally works (if anything).