Domanda

I have a C# application running on WinXP that needs to display some symbols, but all I'm getting are squares. I did some digging around and found font linking.

I used it successfully with Arial and Calibri, I cannot get it to work with Myriad Pro.

I set the following in the registry in HKEY_LOCAL_MACHINE–\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink (following http://msdn.microsoft.com/en-us/goglobal/bb688134)

Arial     | REG_SZ       | segoe_ui_symbol.ttf,Segoe UI Symbol
Calibri   | REG_MULTI_SZ | segoe_ui_symbol.ttf,Segoe UI Symbol
MyriadPro | REG_MULTI_SZ | segoe_ui_sumbol.ttf,Segoe UI Symbol

and so on for MyriadPro bold, bold condensed, bold condensed italic, bold italic, condensed, condensed italic, regular, semibol, semibold italic, but I still get squares instead of the characters... I also tried using Myriad as a key, also does not work...

Before I added the entries for Arial and Calibri I had squares instead of characters, but they started working after I added the entries.

What am I doing wrong? Can I not link Myriad Pro?

Thanks in advance!

È stato utile?

Soluzione

I eventually managed to figure what was wrong.

Apparently fonts default to Microsoft Sans Serif for missing characters, but Microsoft Sans Serif may not have those characters.

I had to manually install Segoe UI Symbol font and link it to Microsoft Sans Serif. I did this by adding the following entry to Microsoft Sans Serif in HKEY_LOCAL_MACHINE–\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

seguisym.ttf,Segoe UI Symbol

A pair (file name,font name). Used no spaces since it was what the page I referred in my question did.

Segoe UI Symbol may already be installed in Win7 from what I saw in my environment, but there may be cases where you need to install it manually. YMMV here, I'm using a specific installation of Win7 for embedded systems.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top