Custom font for label
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Custom font for label

  1. #1
    Join Date
    Sep 2005
    Location
    Cracow, Poland
    Posts
    345

    Question Custom font for label

    I would like to display some label in custom font for which I have *.ttf file. So I added this file to solution to 'Resources' folder with build action set as a resource. Font`s name is Katana. Then I tried to set FontFamily of my label in this way:

    <Label FontFamily="./Resources/#Katana">Importing data...</Label>

    I tried many different combinations of that string but none of them worked. How to do that?

    Thank you for help

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Custom font for label

    I think the font must be installed in Windows and avalable in system's Fonts folder. If you explore the folder, there is "Install new font" command in File menu.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  3. #3
    Join Date
    Sep 2005
    Location
    Cracow, Poland
    Posts
    345

    Re: Custom font for label

    I don`t think so. In my opinion MSDN also states that this is not true: http://msdn.microsoft.com/en-us/library/ms753303.aspx .

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,363

    Re: Custom font for label

    Quote Originally Posted by yoyosh View Post
    I don`t think so. In my opinion MSDN also states that this is not true: http://msdn.microsoft.com/en-us/library/ms753303.aspx .
    What happens when you run the sample code from the link with the fonts from the sdk? Does it work?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center