internal MatchingStyle( FontStyle style, FontWeight weight, FontStretch stretch ) { _vector = new Vector( (stretch.ToOpenTypeStretch() - FontStretches.Normal.ToOpenTypeStretch()) * FontStretchScale, style.GetStyleForInternalConstruction() * FontStyleScale, (weight.ToOpenTypeWeight() - FontWeights.Normal.ToOpenTypeWeight()) / 100.0 * FontWeightScale ); }
internal GlyphTypeface GetGlyphTypeface( FontStyle style, FontWeight weight, FontStretch stretch ) { Text.TextInterface.Font bestMatch = _family.GetFirstMatchingFont((Text.TextInterface.FontWeight)weight.ToOpenTypeWeight(), (Text.TextInterface.FontStretch)stretch.ToOpenTypeStretch(), (Text.TextInterface.FontStyle)style.GetStyleForInternalConstruction()); Debug.Assert(bestMatch != null); return(new GlyphTypeface(bestMatch)); }