none
Adding new font to WinCE RRS feed

  • Question

  • Hi all,

    How i can add new font to WinCE?

    I can see some sysgen variables (in Catalog items) for different fonts. But customer provided us two .ttf files and they need those fonts in the device.

    But these files not matching with any inbuilt fonts that can be enabled using sysgen variables.

    I found from some links that we can copy .ttf files to Windows/fonts folder.

    But the .ttf file size is about 35MB. If we put these files in FILES folder (for copying to Windows/fonts folder) the size of NK will be increased largely, which i don't want to do.

    Is there any other way for adding custom fonts to WinCE?

    Thanks,

    With regards,

    Keshava G N


    Keshava G N ( keshavagn@iwavesystems.com ), Member - Technical, iWave Systems ( http://iwavesystems.com )



    • Edited by Keshava GN Tuesday, April 16, 2013 5:26 AM
    Tuesday, April 16, 2013 5:25 AM

All replies

  • You can put it, to the storage device (i.e. NAND flash ) and link them in registry under:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]

    Here's documentation:
    http://msdn.microsoft.com/en-us/library/ee489867(v=winembedded.60).aspx

    In addition you can specify font loading location by:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontPath]
        "FontPath"="\\NandFlash\\Fonts"


    • Edited by Pawel W Z Tuesday, April 16, 2013 9:40 AM
    Tuesday, April 16, 2013 9:34 AM
  • Hi PawelZ,

    Thanks for the reply..

    I understood the concept of "Linking capability"...

    But how to put it in NAND?

    I don't want the customer to do it manually...

    Thanks.

    With regards,

    Keshava G N



    Keshava G N ( keshavagn@iwavesystems.com ), Member - Technical, iWave Systems ( http://iwavesystems.com )

    Tuesday, April 16, 2013 9:42 AM
  • This depends on your platform capabilities. For example Freescale is providing MfgTool in which you can prepare a profile that will upload files to the device during flash process. But overall it's really wide question and differ from what you ask in the beginning.
    Tuesday, April 16, 2013 9:54 AM
  • Hi PawelZ,

    Thanks for your help.

    After analyzing the link you've provided, i have some doubt:

    Weather this:

    
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]
       "Tahoma"="\\windows\\Trebuc.ttf,Trebuchet MS"

    will replace the original font Tahoma?? Or else what it is doing?

    If i want to change the name of my custom font, what i can do?

    I want to change the name just to make sure that it's working.

    For ex: i have a font "tahoma_ux.ttf" and the font "tahoma.ttf" is already there in WinCE. But i want to differentiate between them.

    I need both should be present in the drop-down menu of WordPad...


    How i can do this??

    Thanks.

    With regards,

    Keshava G N


    Keshava G N ( keshavagn@iwavesystems.com ), Member - Technical, iWave Systems ( http://iwavesystems.com )

    Tuesday, April 16, 2013 12:34 PM
  • If you want both fonts present, you just need your font to be in the Windows font search path. By default, that's \windows\fonts. If you can put it there, you should find it in WordPad. If you can't put it there (\windows\fonts isn't persistent or whatever reason), you can add a font search folder, FontPath, to your registry and store the new font in that path (storage card, internal flash configured to look like disk storage, etc.) You do not need font linking!

    Paul T.

    Tuesday, April 16, 2013 3:01 PM
  • You must copy the TTF or TTC file to the device somehow.  You can choose to include it in your NK.BIN image, which as you know, increases its size, or, as pointed out above, you can include it in a different location and have it located via the registry.  But you'll need to set up some scheme for getting the file loaded into that folder when the device is configured, so the end user doesn't have to do that for you.  Make sure that location is a peristent one!

    A .TTC file is a compressed TrueType file, so if you can locate a .TTC file for the desired font, that would help the situation.

    I would exhaust this approach before trying to do font linking.  It could lead to unexpected problems, esp. if you try to replace a widely-used font like Tahoma; for instance, dialogs and messages from other apps might change in appearance.

    Tuesday, April 16, 2013 3:18 PM
  • You can add a font search folder, FontPath, to your registry and store the new font in that path (storage card, internal flash configured to look like disk storage, etc.)

    Hi Paul,

    Thanks.

    "Adding a font search folder" means \Windows\Fonts will continue being one of the search folder and in addition my custom folder also become one of the search folder??

    Or it will look only into custom folder and whatever .ttf files present in \Windows\Fonts will  not be considered??

    With regards,

    Keshava G N


    Keshava G N ( keshavagn@iwavesystems.com ), Member - Technical, iWave Systems ( http://iwavesystems.com )

    Wednesday, April 17, 2013 4:35 AM
  • A .TTC file is a compressed TrueType file, so if you can locate a .TTC file for the desired font, that would help the situation.

    Hi,

    Thanks!

    But i have only .ttf file now.

    Is there a way to convert/compress this to .ttc file?

    With regards,

    Keshava G N


    Keshava G N ( keshavagn@iwavesystems.com ), Member - Technical, iWave Systems ( http://iwavesystems.com )

    Wednesday, April 17, 2013 5:08 AM