System\Windows\Media\CharacterMetrics.cs (29)
47private const int NumFields = (int)FieldIndex.BottomSideBearing + 1;
48private const int NumRequiredFields = (int)FieldIndex.BlackBoxHeight + 1;
87int lastIndex = (int)FieldIndex.BlackBoxHeight;
90AppendField(_baseline, FieldIndex.Baseline, ref lastIndex, s);
91AppendField(_leftSideBearing, FieldIndex.LeftSideBearing, ref lastIndex, s);
92AppendField(_rightSideBearing, FieldIndex.RightSideBearing, ref lastIndex, s);
93AppendField(_topSideBearing, FieldIndex.TopSideBearing, ref lastIndex, s);
94AppendField(_bottomSideBearing, FieldIndex.BottomSideBearing, ref lastIndex, s);
104CompositeFontParser.VerifyNonNegativeMultiplierOfEm("BlackBoxWidth", ref metrics[(int)FieldIndex.BlackBoxWidth]);
105CompositeFontParser.VerifyNonNegativeMultiplierOfEm("BlackBoxHeight", ref metrics[(int)FieldIndex.BlackBoxHeight]);
106CompositeFontParser.VerifyMultiplierOfEm("Baseline", ref metrics[(int)FieldIndex.Baseline]);
107CompositeFontParser.VerifyMultiplierOfEm("LeftSideBearing", ref metrics[(int)FieldIndex.LeftSideBearing]);
108CompositeFontParser.VerifyMultiplierOfEm("RightSideBearing", ref metrics[(int)FieldIndex.RightSideBearing]);
109CompositeFontParser.VerifyMultiplierOfEm("TopSideBearing", ref metrics[(int)FieldIndex.TopSideBearing]);
110CompositeFontParser.VerifyMultiplierOfEm("BottomSideBearing", ref metrics[(int)FieldIndex.BottomSideBearing]);
112double horizontalAdvance = metrics[(int)FieldIndex.BlackBoxWidth]
113+ metrics[(int)FieldIndex.LeftSideBearing]
114+ metrics[(int)FieldIndex.RightSideBearing];
118double verticalAdvance = metrics[(int)FieldIndex.BlackBoxHeight]
119+ metrics[(int)FieldIndex.TopSideBearing]
120+ metrics[(int)FieldIndex.BottomSideBearing];
125_blackBoxWidth = metrics[(int)FieldIndex.BlackBoxWidth];
126_blackBoxHeight = metrics[(int)FieldIndex.BlackBoxHeight];
127_baseline = metrics[(int)FieldIndex.Baseline];
128_leftSideBearing = metrics[(int)FieldIndex.LeftSideBearing];
129_rightSideBearing = metrics[(int)FieldIndex.RightSideBearing];
130_topSideBearing = metrics[(int)FieldIndex.TopSideBearing];
131_bottomSideBearing = metrics[(int)FieldIndex.BottomSideBearing];
135private static void AppendField(double value, FieldIndex fieldIndex, ref int lastIndex, StringBuilder s)