<?xml version="1.0" encoding="windows-1251"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) ENPC - Jean-Philippe Chancelier
 * Copyright (C) DIGITEO - 2008 - Allan CORNET
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:id="xlfont" xml:lang="en">
    <refnamediv>
        <refname>xlfont</refname>
        <refpurpose>load a font in the graphic context or query loaded
            font
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>xlfont(font-name)
            xlfont(font-filename)
            xlfont('reset')
            xlfont(font-name,font-id)
            xlfont(font-filename,font-id)
            xlfont(font-name,font-id,bold)
            xlfont(font-name,font-id,bold,italic)
            fonts=xlfont('AVAILABLE_FONTS')
            fonts=xlfont()
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>font-name</term>
                <listitem>
                    <para>string, name of the font family.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>font-filename</term>
                <listitem>
                    <para>string, filename of a true type font.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>font-id</term>
                <listitem>
                    <para>integer &gt;= 0 .</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fonts</term>
                <listitem>
                    <para>a column vector of font names.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>bold</term>
                <listitem>
                    <para>a boolean %t if bold</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>italic</term>
                <listitem>
                    <para>a boolean %t if italic</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Without any argument, <literal>xlfont()</literal> returns the list
            of currently loaded fonts.
        </para>
        <para>xlfont('AVAILABLE_FONTS') returns list of fonts available on your
            system.
        </para>
        <para>xlfont('reset') reset to initial index list of fonts.</para>
        <para>
            With arguments, <literal>xlfont</literal> is used to load a new font
            at different sizes in the graphics context.
        </para>
        <para>Default family fonts are "Monospaced" (0), "Symbol" (1), "Serif"
            (2), "Serif Italic" (3), "Serif Bold" (4), "Serif Bold Italic" (5),
            "SansSerif" (6), "SansSerif Italic" (7), "SansSerif Bold" (8), "SansSerif
            Bold Italic" (9). These default fonts are automatically loaded when needed
            and so <literal>xlfont</literal> is not really required for them. In fact
            <literal>xlfont</literal> is essentially useful to load a new font.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
xlfont('reset');
xlfont()

// Caution : this example may not work if your system have not Monospaced font.
xlfont("Monospaced",10,%t,%t);
xstring(1,0,'A title');
figure_entity = gcf();
axes_entity = figure_entity.children;
title_entity = axes_entity.children;
title_entity.font_style = 10;

xlfont('reset');
 ]]></programlisting>
    </refsection>
</refentry>
