コード例 #1
0
        /// <summary>
        /// Initialise QFont from a font file
        /// </summary>
        /// <param name="fontPath">The font file to load</param>
        /// <param name="size">The size</param>
        /// <param name="config">The configuration</param>
        /// <param name="style">The style</param>
        public QFont(string fontPath, float size, QFontBuilderConfiguration config,
                     FontStyle style = FontStyle.Regular)
        {
            float fontScale = 1f;

            using (IFont font = GetFont(fontPath, size, style, config?.SuperSampleLevels ?? 1, fontScale))
            {
                FontName = font.ToString();
                InitialiseQFont(font, config);
            }
        }