Beispiel #1
0
        private FontSystem LoadFont(int blur, int stroke)
        {
            var fontLoader     = StbTrueTypeSharpFontLoader.Instance;
            var textureCreator = new Texture2DManager(GraphicsDevice);

            var result = new FontSystem(fontLoader, textureCreator, 1024, 1024, blur, stroke);

            result.AddFont(File.ReadAllBytes(@"Fonts/DroidSans.ttf"));
            result.AddFont(File.ReadAllBytes(@"Fonts/DroidSansJapanese.ttf"));
            result.AddFont(File.ReadAllBytes(@"Fonts/Symbola-Emoji.ttf"));

            return(result);
        }
Beispiel #2
0
        private FontSystem LoadFont(FontSystemEffect effect, int effectAmount, float resolutionFactor)
        {
            var settings = new FontSystemSettings
            {
                Effect               = effect,
                EffectAmount         = effectAmount,
                FontResolutionFactor = resolutionFactor
            };

            var result = new FontSystem(settings);

            result.AddFont(File.ReadAllBytes(@"Fonts/DroidSans.ttf"));
            result.AddFont(File.ReadAllBytes(@"Fonts/DroidSansJapanese.ttf"));
            result.AddFont(File.ReadAllBytes(@"Fonts/Symbola-Emoji.ttf"));

            return(result);
        }
Beispiel #3
0
        private FontSystem LoadFont(FontSystemEffect effect, int effectAmount)
        {
            var textureCreator = new Texture2DManager(GraphicsDevice);

            var settings = new FontSystemSettings
            {
                Effect       = effect,
                EffectAmount = effectAmount
            };

            var result = new FontSystem(settings);

            result.AddFont(File.ReadAllBytes(@"Fonts/DroidSans.ttf"));
            result.AddFont(File.ReadAllBytes(@"Fonts/DroidSansJapanese.ttf"));
            result.AddFont(File.ReadAllBytes(@"Fonts/Symbola-Emoji.ttf"));

            return(result);
        }