System\Windows\Media\CharacterMetrics.cs (29)
38private const int NumFields = (int)FieldIndex.BottomSideBearing + 1;
39private const int NumRequiredFields = (int)FieldIndex.BlackBoxHeight + 1;
78int lastIndex = (int)FieldIndex.BlackBoxHeight;
81AppendField(_baseline, FieldIndex.Baseline, ref lastIndex, s);
82AppendField(_leftSideBearing, FieldIndex.LeftSideBearing, ref lastIndex, s);
83AppendField(_rightSideBearing, FieldIndex.RightSideBearing, ref lastIndex, s);
84AppendField(_topSideBearing, FieldIndex.TopSideBearing, ref lastIndex, s);
85AppendField(_bottomSideBearing, FieldIndex.BottomSideBearing, ref lastIndex, s);
95CompositeFontParser.VerifyNonNegativeMultiplierOfEm("BlackBoxWidth", ref metrics[(int)FieldIndex.BlackBoxWidth]);
96CompositeFontParser.VerifyNonNegativeMultiplierOfEm("BlackBoxHeight", ref metrics[(int)FieldIndex.BlackBoxHeight]);
97CompositeFontParser.VerifyMultiplierOfEm("Baseline", ref metrics[(int)FieldIndex.Baseline]);
98CompositeFontParser.VerifyMultiplierOfEm("LeftSideBearing", ref metrics[(int)FieldIndex.LeftSideBearing]);
99CompositeFontParser.VerifyMultiplierOfEm("RightSideBearing", ref metrics[(int)FieldIndex.RightSideBearing]);
100CompositeFontParser.VerifyMultiplierOfEm("TopSideBearing", ref metrics[(int)FieldIndex.TopSideBearing]);
101CompositeFontParser.VerifyMultiplierOfEm("BottomSideBearing", ref metrics[(int)FieldIndex.BottomSideBearing]);
103double horizontalAdvance = metrics[(int)FieldIndex.BlackBoxWidth]
104+ metrics[(int)FieldIndex.LeftSideBearing]
105+ metrics[(int)FieldIndex.RightSideBearing];
109double verticalAdvance = metrics[(int)FieldIndex.BlackBoxHeight]
110+ metrics[(int)FieldIndex.TopSideBearing]
111+ metrics[(int)FieldIndex.BottomSideBearing];
116_blackBoxWidth = metrics[(int)FieldIndex.BlackBoxWidth];
117_blackBoxHeight = metrics[(int)FieldIndex.BlackBoxHeight];
118_baseline = metrics[(int)FieldIndex.Baseline];
119_leftSideBearing = metrics[(int)FieldIndex.LeftSideBearing];
120_rightSideBearing = metrics[(int)FieldIndex.RightSideBearing];
121_topSideBearing = metrics[(int)FieldIndex.TopSideBearing];
122_bottomSideBearing = metrics[(int)FieldIndex.BottomSideBearing];
126private static void AppendField(double value, FieldIndex fieldIndex, ref int lastIndex, StringBuilder s)