Symbian3/PDK/Source/GUID-5042997F-4B8C-538D-B1E0-DD82F5283BB6.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 9 59758314f811
child 14 578be2adaf3e
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-5042997F-4B8C-538D-B1E0-DD82F5283BB6" xml:lang="en"><title>Linked
Fonts Guide</title><shortdesc>The linked font feature allows the creation of linked typefaces
using characters from two or more existing typefaces. Once created, linked
typefaces are available to all users. Application developers do not need to
know whether a font is a linked font or a real font. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p> </p>
<p> <b>Target audience</b>: Device creators. </p>
<section><title>Key concepts and terms</title> <p>See <xref href="GUID-90644B52-69D7-595C-95E3-D6F7A30C060D.dita">Font
and Text Services Collection Overview</xref>. </p> </section>
<section><title>Overview</title> <p>A linked typeface can be considered a
virtual typeface that has a name and consists of one or more typefaces (open
fonts only). A typeface is usually made up of an alphabet of letters, numerals
and punctuation marks. It may include or consist entirely of ideograms and
symbols. </p> <p>The following diagram represents a linked typeface that consists
of characters from Chinese and English typefaces. </p> <fig id="GUID-D9F370EF-BA91-5D8B-B963-D3B6EBEFAFF5">
<title>              Figure 1: An example linked typeface that contains Chinese
and              English characters            </title>
<image href="GUID-ACC2777E-F555-58ED-82D0-6F8423FB3EA3_d0e667197_href.png" placement="inline"/>
</fig> <p>Once a linked typeface has been successfully created, fonts can
be derived from it and rasterized in just the same way as from a non-linked
typeface. Similarly clients request a font from a linked typeface in the same
way as from any other typeface. </p> <p>Using linked typefaces reduces the
ROM size because it reduces the number of font files that are required. The
following table provides an example that demonstrates this. </p> <table id="GUID-CB3CE0D8-7E18-56D5-AC1C-D4E765410198">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>Using standard unlinked fonts</entry>
<entry>Using linked fonts</entry>
</row>
</thead>
<tbody>
<row>
<entry><p>Chinese and Bold English </p> </entry>
<entry><p>Chinese </p> </entry>
</row>
<row>
<entry><p>Chinese and Italic English </p> </entry>
<entry><p>English </p> </entry>
</row>
<row>
<entry><p>Chinese and Bold Italic English </p> </entry>
<entry><p>Linked Font File </p> </entry>
</row>
<row>
<entry><p>Chinese and Underline English </p> </entry>
<entry/>
</row>
</tbody>
</tgroup>
</table> <p>A linked typeface can contain more than one complex font (for
example, another linked font). The font rasterizer merges the tables required
for the shaping engine. </p> <p><b>The Canonical font </b> </p> <p>The creator
of a linked typeface must specify one of the component typefaces as the principal,
or canonical, typeface. If no font is specified as the canonical font, an
error is returned at registration. Similarly an error is returned if more
than one font is specified as the canonical font. </p> <p>When a character
or character metric is requested from a linked font, the real fonts that make
it up are checked, one after another, in the order in which they were originally
added to the linked typeface, until a match is found and the
requested information can be returned. If no match is found in any of the
real fonts within a linked font, the missing character glyph is supplied from
the canonical font. </p> <p><b>Typeface groups </b> </p> <p>A linked typeface
must be created with at least one typeface group and each typeface must belong
to a typeface group. A typeface group defines metrics applicable to all of
the typefaces that it contains. The metrics are as follows: </p> <ul>
<li id="GUID-B6AA0A72-EE60-5BC1-9BC4-488ECB417D02"><p>Scaling Option: The
different ways in which a typeface can be scaled. (None, up, down, or both
up and down.) </p> </li>
<li id="GUID-59A4FDD5-5052-5BE8-8C29-B169E857B669"><p>Baseline Shift: Whether
the font baseline can be shifted or not. </p> </li>
<li id="GUID-65082783-3EAF-5C8E-ACA8-E9D264DD2EE4"><p>Boldness Percentage:
How bold a bold font is. </p> </li>
<li id="GUID-1BE6F5B0-71D8-5B1F-B087-037DEA0B499B"><p>Italic Angle: The angle
(in percent) of italic text. </p> </li>
</ul> </section>
<section><title>Linked typeface creation</title> <p>You create a linked typeface
in two stages, as shown in the following diagram. First you build up the specification.
Then when the specification is complete, you register it with the <xref href="GUID-71DADA82-3ABC-52D2-8360-33FAEB2E5DE9.dita">Font
and Bitmap Server</xref>. </p> <fig id="GUID-2AC8C198-0BDB-5D69-B53D-3391F33658E7">
<title>              Figure 2: The linked typeface creation process      
     </title>
<image href="GUID-192003B7-631D-5AF6-9511-119EF5853054_d0e667341_href.png" placement="inline"/>
</fig> <p>The following diagram represents the structure of the specification
for the Chinese - English example shown in Figure 1 above. </p> <fig id="GUID-F44F3735-B486-5870-9514-10B80ADDDE99">
<title>              Figure 3: The structure of the specification for the
Chinese -              English example.            </title>
<image href="GUID-597D496F-D85A-5FFD-B9CA-FDCA3E016BE7_d0e667352_href.png" placement="inline"/>
</fig> <p>See <xref href="GUID-5B4D38A7-DCDC-51D8-A349-050CF0FD1586.dita">Creating
a Linked Typeface</xref> for more information. </p> </section>
<section><title>Related APIs</title> <p>The following table shows the linked
typeface classes. They are primarily designed for the creation of device system
fonts. The platform security capability <codeph>ECapabilityWriteDeviceData</codeph> is
required to register linked typefaces. <codeph>ECapabilityReadDeviceData</codeph> is
required to fetch linked typeface information from the <xref href="GUID-71DADA82-3ABC-52D2-8360-33FAEB2E5DE9.dita">Font
and Bitmap Server</xref>. </p> <table id="GUID-4485D14A-2A96-5D1D-BDF6-56E91EE4F7A2">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>Class</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <xref href="GUID-6BE49D00-7174-3FEC-A944-FE4A5228C13E.dita"><apiname>CLinkedTypefaceSpecification</apiname></xref>  </p> </entry>
<entry><p>The specification of a linked typeface, made up of groups and typefaces. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-DDFD0FCB-8413-3FF2-A8D7-A052C30592C9.dita"><apiname>CLinkedTypefaceElementSpec</apiname></xref>  </p> </entry>
<entry><p>Specifies an individual typeface within a linked typeface. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-623C40B5-A8FB-3FEE-9F92-254CAB580C5B.dita"><apiname>CLinkedTypefaceGroup</apiname></xref>  </p> </entry>
<entry><p>Represents the typeface group. Groups have attributes that control
how the rasterizer draws the typefaces within the group. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
</conbody><related-links>
<link href="GUID-5B4D38A7-DCDC-51D8-A349-050CF0FD1586.dita"><linktext>Creating
a Linked Typeface</linktext></link>
<link href="GUID-90644B52-69D7-595C-95E3-D6F7A30C060D.dita"><linktext>Font and
Text Services Collection Overview </linktext></link>
<link href="GUID-416A3756-B5D5-5BCD-830E-2371C5F6B502.dita"><linktext>Font Store
Component Overview </linktext></link>
<link href="GUID-71DADA82-3ABC-52D2-8360-33FAEB2E5DE9.dita"><linktext> Font and
Bitmap Server Component Overview</linktext></link>
</related-links></concept>