我們已經在我們的代碼創建了下面的圖像(它是用來做,說:「文件」使用功能區中的一個圖像):如何使GlyphTypeface FontUri通用
<DrawingImage x:Key="FileText">
<DrawingImage.Drawing>
<GlyphRunDrawing ForegroundBrush="White">
<GlyphRunDrawing.GlyphRun>
<GlyphRun
CaretStops="{x:Null}"
ClusterMap="{x:Null}"
IsSideways="False"
GlyphOffsets="{x:Null}"
GlyphIndices="41 76 79 72"
FontRenderingEmSize="12"
DeviceFontName="{x:Null}"
AdvanceWidths="5.859375 2.90625 2.90625 6.275390625">
<GlyphRun.GlyphTypeface>
<GlyphTypeface FontUri="C:\WINDOWS\Fonts\SEGOEUI.TTF"/>
</GlyphRun.GlyphTypeface>
</GlyphRun>
</GlyphRunDrawing.GlyphRun>
</GlyphRunDrawing>
</DrawingImage.Drawing>
</DrawingImage>
的問題是,我們的一個客戶有一個Windows映像,它不使用C:\ Windows,而是使用C:\ WINNT。這會導致應用程序在啓動時崩潰而日誌不是很有用。任何想法如何推廣FontUri,以便它可以在這樣的系統設置上工作?
您可以在路徑中使用'%systemroot%'而不是'C:\ Windows'嗎? – Rachel 2012-07-17 14:50:54