Share via


Embed a font or a subset of a font in your application

This page applies to WPF and Silverlight 2

After you have added a custom font to your application, you must embed the whole font or a subset of the font so that the users of your application will be able to see the font. Typically, users will already have most of the fonts that you can select in Microsoft Expression Blend 2, and therefore you do not have to embed them. However, you must embed a custom font so that your users will see it. If the user does not have your font, a default system font will be used to format your text.

Important

If you decide to embed, subset, or otherwise redistribute fonts in your application, it is your responsibility to make sure that you have the required license rights for those fonts.

Note

Font embedding is not available when you open a Microsoft Silverlight 1.0 project.

To embed a font using the Font Manager

  1. Open the Font Manager using one of the procedures from Open the Font Manager. The Font Manager window appears.

    Cc294629.69eb8d5f-797b-495e-b8ba-77261d0061a0(en-us,Expression.10).png

  2. Under Embed Fonts, select the check box next to the font that you want to embed, select the font name by clicking it, and then, under Subset Characters, do one of the following:

    • To embed the whole font, select the All Glyphs check box.

    • To embed only those characters that you use in your application, select the Auto Fill check box.

    • To embed a static subset of the font, select one or more of the remaining character sets under Subset Characters. You can also enter individual characters in the Include Glyphs text box to embed those characters.

To embed a font while modifying a text control

  1. Select the object that contains the text that you want to format, by using either the Selection Cc294629.2ff91340-477e-4efa-a0f7-af20851e4daa(en-us,Expression.10).png tool or the Direct Selection Cc294629.6dd6571f-c116-451d-8dd2-1f88b8406362(en-us,Expression.10).png tool.

  2. If your text object supports rich text, press F2 to enter text-editing mode for the object, and then select the text that you want to format.

  3. In the Properties panel, under Text, click the Font Cc294629.17db489b-22e6-4b99-9a19-fa1ed9d51e7e(en-us,Expression.10).png tab, and then select your custom font from the FontFamily drop-down menu. (Custom fonts are displayed at the top of the list.

  4. Select the Embed check box to embed the font in your application.

    Cc294629.fc5b9ec5-be55-4bdf-8871-ffbd193ef50a(en-us,Expression.10).png

  5. Next to the Embed check box, in the Subset selection drop-down menu, do one of the following:

    • To embed the characters that are used in the selected object, select Static. Use this option when you know that the text will not be updated at runtime.

    • To embed all the characters in the font, select Dynamic. Use this selection when you know that the text will be updated at runtime (for example, in an editable control such as a TextBox).

    Note

    You can further refine the subset in the Font Manager by clicking the Show advanced properties Cc294629.81e110f1-4068-4299-957d-0693cea95088(en-us,Expression.10).png button under Text, clicking Font Manager, selecting your font under Embed Fonts, and then selecting various character sets under Subset Characters.

See also

Concepts

Add a custom font to your application

Format text

Open the Font Manager