Focal Point
[CLOSED] Google Fonts in STY files

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1517040196

January 14, 2019, 01:48 PM
mxr154830
[CLOSED] Google Fonts in STY files
I need help adding Google Fonts (or any web font) to a STY file. I used the following statement to make Google Fonts (Open Sans) work with CSS:

@import url('https://fonts.googleapis.com/css?family=Open+Sans');

Any way to import this in WebFOCUS stylesheets?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.2.03
Windows 10
January 14, 2019, 02:01 PM
Hallway
Not sure if you can import it to a stylesheet, but you can in an HTMLFORM block
  
-SET &ECHO=ALL;

TABLE FILE CAR
PRINT
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY LOWEST CAR.ORIGIN.COUNTRY
BY LOWEST CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENWarm.sty,$
TYPE=REPORT, FONT='Open Sans', TITLETEXT='Google Open Sans', $
ENDSTYLE
END

-HTMLFORM BEGIN NOEVAL
<head>
    <style>
        @import url('https://fonts.googleapis.com/css?family=Open+Sans');
    </style>
</head>
-HTMLFORM END



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
January 14, 2019, 03:28 PM
mxr154830
quote:
Originally posted by Hallway:
Not sure if you can import it to a stylesheet, but you can in an HTMLFORM block
  
-SET &ECHO=ALL;

TABLE FILE CAR
PRINT
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY LOWEST CAR.ORIGIN.COUNTRY
BY LOWEST CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENWarm.sty,$
TYPE=REPORT, FONT='Open Sans', TITLETEXT='Google Open Sans', $
ENDSTYLE
END

-HTMLFORM BEGIN NOEVAL
<head>
    <style>
        @import url('https://fonts.googleapis.com/css?family=Open+Sans');
    </style>
</head>
-HTMLFORM END


Thank you for the reply.

The HTMLFORM block works at a report/chart level. I need it to be part of a WebFOCUS stylesheet. Doing this at a report level is not an option for me. Thank you once again.


WebFOCUS 8.2.03
Windows 10
January 16, 2019, 10:12 AM
Tony A
Have you thought about using SET CSSURL = [path to your css file] and then add that to your site profile?

You should then be able to set the font within your .sty file.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 16, 2019, 11:26 AM
Hallway
quote:
Originally posted by Tony A:
Have you thought about using SET CSSURL = [path to your css file] and then add that to your site profile?

You should then be able to set the font within your .sty file.

T


Good One


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
January 16, 2019, 12:19 PM
Tony A
You set it up and I'll hit it Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10