Skip to content

Tag Definition: setFont

Generated by rlextra version 3.6.13

Attributes

Name

Required?

Default_Value

Values

leading

implied

None

name

required

None

size

required

None

Can contain
EMPTY

Purpose

Set the font used by text within pageGraphics until it is redefined.

We can set the font we want to use with the name, the size of the font and the leading between the lines.

Check out our docs page on this.

Example usage

<template title="myPage" lang="en-GB" pageSize="(595, 842)" leftMargin="72" showBoundary="0">
    <pageTemplate id="cover">
        <pageGraphics>
            <setFont name="Arial-Regular" size="9"/>
            <drawRightString x="555" y="20">Page <pageNumber/></drawRightString>
        </pageGraphics>
        <frame id="general" x1="30" y1="30" width="535" height="782"/>
    </pageTemplate>
</template>

Note: Only relevant sections are used in this snippet. Some tags were not included. See some of our samples for further insight of how you may go about setting up a full document using rml.

Example of nesting path from the parent tags to the current tag

<document> ➔ <template> ➔ <pageTemplate> ➔ <pageGraphics> ➔ <setFont>