Difference between revisions of "SUNScholar/XMLUI Theme/M2/Customisation/Typography"

From Libopedia
Jump to navigation Jump to search
m
Line 7: Line 7:
 
At Stellenbosch University we elected to use the free Google Lato font as it the closest in style to the Gill Sans font used on our library web site.
 
At Stellenbosch University we elected to use the free Google Lato font as it the closest in style to the Gill Sans font used on our library web site.
  
See: https://developers.google.com/fonts/docs/getting_started
+
See: https://developers.google.com/fonts/docs/getting_started and https://github.com/google/fonts
  
 
Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Theme/Fonts
 
Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Theme/Fonts

Revision as of 10:35, 22 June 2015

Back to Mirage 2 Customisation

Introduction

This wiki page has instructions on how to configure the fonts used in your custom Mirage 2 theme.

At Stellenbosch University we elected to use the free Google Lato font as it the closest in style to the Gill Sans font used on our library web site.

See: https://developers.google.com/fonts/docs/getting_started and https://github.com/google/fonts

Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Theme/Fonts

Step 1 - Define fonts reference

Modify XSL to use custom fonts. Check the following link:

Edit the following file:

nano $HOME/source/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl

Go to line 194 and insert the following:

<link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'/>

Make sure to indent and format the insertion correctly.

Step 2 - Define fonts CSS

Edit the following file:

nano $HOME/source/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_bootstrap_variables.scss

Go to the bottom of the file and add the following:

/**
* Fonts CSS
**/

$font-size-base:          13px;
$font-size-large:         14px;
$font-size-small:         10px;

$font-family-base:       'Lato';
$font-family-serif:      'Lato',serif;
$font-family-sans-serif: 'Lato',sans-serif;
$font-family-monospace:  'Lato',monospace;

Step 3 - Define font headings CSS

Edit the following file:

 nano $HOME/source/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_bootstrap_variables.scss

Go to the bottom of the file and add the following:

/**
* Headings CSS
**/

$font-size-h1:            1.1em; 
$font-size-h2:            1.0em; 
$font-size-h3:            1.0em; 
$font-size-h4:            1.0em; 
$font-size-h5:            1.0em;
$font-size-h6:            1.0em;

$headings-font-family:    inherit;
$headings-font-weight:    700;
$headings-line-height:    1.0;
$headings-color:          inherit;

Adjust the settings to suit your institution.