Core\CSharp\System\Windows\Media\CharacterMetrics.cs (29)
50private const int NumFields = (int)FieldIndex.BottomSideBearing + 1;
51private const int NumRequiredFields = (int)FieldIndex.BlackBoxHeight + 1;
91int lastIndex = (int)FieldIndex.BlackBoxHeight;
94AppendField(_baseline, FieldIndex.Baseline, ref lastIndex, s);
95AppendField(_leftSideBearing, FieldIndex.LeftSideBearing, ref lastIndex, s);
96AppendField(_rightSideBearing, FieldIndex.RightSideBearing, ref lastIndex, s);
97AppendField(_topSideBearing, FieldIndex.TopSideBearing, ref lastIndex, s);
98AppendField(_bottomSideBearing, FieldIndex.BottomSideBearing, ref lastIndex, s);
108CompositeFontParser.VerifyNonNegativeMultiplierOfEm("BlackBoxWidth", ref metrics[(int)FieldIndex.BlackBoxWidth]);
109CompositeFontParser.VerifyNonNegativeMultiplierOfEm("BlackBoxHeight", ref metrics[(int)FieldIndex.BlackBoxHeight]);
110CompositeFontParser.VerifyMultiplierOfEm("Baseline", ref metrics[(int)FieldIndex.Baseline]);
111CompositeFontParser.VerifyMultiplierOfEm("LeftSideBearing", ref metrics[(int)FieldIndex.LeftSideBearing]);
112CompositeFontParser.VerifyMultiplierOfEm("RightSideBearing", ref metrics[(int)FieldIndex.RightSideBearing]);
113CompositeFontParser.VerifyMultiplierOfEm("TopSideBearing", ref metrics[(int)FieldIndex.TopSideBearing]);
114CompositeFontParser.VerifyMultiplierOfEm("BottomSideBearing", ref metrics[(int)FieldIndex.BottomSideBearing]);
116double horizontalAdvance = metrics[(int)FieldIndex.BlackBoxWidth]
117+ metrics[(int)FieldIndex.LeftSideBearing]
118+ metrics[(int)FieldIndex.RightSideBearing];
122double verticalAdvance = metrics[(int)FieldIndex.BlackBoxHeight]
123+ metrics[(int)FieldIndex.TopSideBearing]
124+ metrics[(int)FieldIndex.BottomSideBearing];
129_blackBoxWidth = metrics[(int)FieldIndex.BlackBoxWidth];
130_blackBoxHeight = metrics[(int)FieldIndex.BlackBoxHeight];
131_baseline = metrics[(int)FieldIndex.Baseline];
132_leftSideBearing = metrics[(int)FieldIndex.LeftSideBearing];
133_rightSideBearing = metrics[(int)FieldIndex.RightSideBearing];
134_topSideBearing = metrics[(int)FieldIndex.TopSideBearing];
135_bottomSideBearing = metrics[(int)FieldIndex.BottomSideBearing];
139private static void AppendField(double value, FieldIndex fieldIndex, ref int lastIndex, StringBuilder s)