コード例 #1
0
        public TypographyFeatureInfo(CanvasTypographyFeatureName n)
        {
            Feature = n;

            if (IsNamedFeature(Feature))
            {
                DisplayName = Feature.Humanize().Transform(To.TitleCase);
            }
            else
            {
                //
                // For custom font features, we can produce the OpenType feature tag
                // using the feature name.
                //
                uint id = (uint)(Feature);
                DisplayName = DirectWrite.GetTagName(id);
            }
        }
コード例 #2
0
        public TypographyFeatureInfo(CanvasTypographyFeatureName n, string displayName = null)
        {
            Feature = n;

            if (displayName != null)
            {
                DisplayName = displayName;
            }
            else if (IsNamedFeature(Feature))
            {
                DisplayName = Feature.Humanise();
            }
            else
            {
                //
                // For custom font features, we can produce the OpenType feature tag
                // using the feature name.
                //
                uint id = (uint)(Feature);
                DisplayName = DirectWrite.GetTagName(id);
            }
        }