How to Create Subset Fonts in .NET?

后端 未结 5 667
天命终不由人
天命终不由人 2021-01-05 04:35

I have a Silverlight application that I need to embed some less-than-common fonts in. It\'s simple enough for me to just copy over the TTF/OTF and compile that with my app.

5条回答
  •  醉酒成梦
    2021-01-05 05:14

    In WPF for fonts there are static and dynamic linking. It all can be defined in Blend. With static linking of fonts only needed characters are compiled and embedded in your assembly. With dynamic linking all font set is embedded. So try to set static linking for selected fonts and try if it works.

    UPD

    Try to add the following code into you .csproj file. Here we including Tahoma fonts. AutoFill property set to true says that we will embed in assembly only used characters of our controls. The set of chars in tag fill point to include these chars into assembly. All other tags set to false, because we don't need them.

    
        
          True
          False
          True
          dasf
          False
          False
          False
          False
        
        
          True
          False
          True
          dasf
          False
          False
          False
          False
        
      
      
    
      
    

提交回复
热议问题