locked
Change font of textblock RRS feed

  • Question

  • Hi,

    I am making an app, and it is possible to change the font of a textblock.

    By checking what fonts are available on the phone, I checked THIS

    However, when I want to change to e.g. Candara, it does simply not work. But Courier New Does.
    The font works over at the Visual Studio designer, but not in the phone. Gives me Segoe UI/Default font.

    Anyone know what to do?

    -Vincent

    Thursday, February 26, 2015 7:49 PM

Answers

  • By checking what fonts are available on the phone, I checked THIS

    That page is confusing, and you need to read it very carefully. It says,
    "In general, you can use a subset of the fonts on the client computer. Text elements can use the following Latin fonts if available on the local computer."
    Candara is listed but it isn't a font preloaded on Windows Phone. That article also has a link to this, which has a list of preloaded fonts. You can use a preloaded font directly by simply specifying the FontFamily. For fonts not preloaded, you need to provide the ttf font file in your project.

    My quote from the MSDN article implies there are no licensing issues with copying the Candara ttf font file to your project. Look for font files on your computer at C:\Windows\Fonts. See this for how to use custom fonts in your project: http://superdevresources.com/how-to-use-custom-fonts-in-windows-phone-and-windows-store-apps/

    • Marked as answer by Vincent Gio Sunday, March 1, 2015 8:10 PM
    Friday, February 27, 2015 2:40 AM

All replies

  • Windows Phone supports numerous fonts including Candara font. Do you have a simple XAML that reproduces this issue?

    Abdulwahab Suleiman

    Friday, February 27, 2015 12:07 AM
  • By checking what fonts are available on the phone, I checked THIS

    That page is confusing, and you need to read it very carefully. It says,
    "In general, you can use a subset of the fonts on the client computer. Text elements can use the following Latin fonts if available on the local computer."
    Candara is listed but it isn't a font preloaded on Windows Phone. That article also has a link to this, which has a list of preloaded fonts. You can use a preloaded font directly by simply specifying the FontFamily. For fonts not preloaded, you need to provide the ttf font file in your project.

    My quote from the MSDN article implies there are no licensing issues with copying the Candara ttf font file to your project. Look for font files on your computer at C:\Windows\Fonts. See this for how to use custom fonts in your project: http://superdevresources.com/how-to-use-custom-fonts-in-windows-phone-and-windows-store-apps/

    • Marked as answer by Vincent Gio Sunday, March 1, 2015 8:10 PM
    Friday, February 27, 2015 2:40 AM
  • Aha, I see.

    Thank you for the information mSpot Inc.

    Sadly, if I include those files, my app goes up to 30mb+ and that's a bit too much.

    -Vincent

    Sunday, March 1, 2015 8:10 PM
  • Sadly, if I include those files, my app goes up to 30mb+ and that's a bit too much.

    What are you counting? On my computer, there are 4 Candara font files (normal, bold, italic, bold-italic), and each of them are only around 220K size.

    Monday, March 2, 2015 3:49 AM
  • Make sure you have an appropriate license to redistribute any fonts that you include in your app package. The quoted article does not appear to address licensing.

    For legal advice consult your lawyer.

    Monday, March 2, 2015 4:35 AM