<commit_before>﻿using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Styles;

namespace Mapsui.Samples.Common.Maps
{
    public static class StackedLabelsSample
    {
        private const string LabelColumn = "Label";

        public static Map CreateMap()
        {
            var map = new Map();
            map.Layers.Add(OsmSample.CreateLayer());
            var provider = PointsSample.CreateRandomPointsProvider(map.Envelope);
            map.Layers.Add(CreateStackedLabelLayer(provider, LabelColumn));
            map.Layers.Add(CreateLayer(provider));
            return map;
        }

        private static ILayer CreateStackedLabelLayer(IProvider provider, string labelColumn)
        {
            return new MemoryLayer
            {
                DataSource = new StackedLabelProvider(provider, new LabelStyle
                {
                    BackColor = new Brush {Color = new Color(240, 240, 240, 128)},
                    ForeColor = new Color(65, 65, 65),
                    LabelColumn = labelColumn
                }),
                Style = null
            };
        }

        private static ILayer CreateLayer(IProvider dataSource)
        {
            return new Layer("Point Layer")
            {
                DataSource = dataSource,
                Style = new SymbolStyle
                {
                    SymbolScale = 0.85,
                    Fill = new Brush(new Color(190, 100, 130, 210)),
                    Outline = new Pen(new Color(140, 50, 100, 210))
                }
            };
        }
    }
}<commit_msg>Using custom font family in stackedlabelsample<commit_after>﻿using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Styles;

namespace Mapsui.Samples.Common.Maps
{
    public static class StackedLabelsSample
    {
        private const string LabelColumn = "Label";

        public static Map CreateMap()
        {
            var map = new Map();
            map.Layers.Add(OsmSample.CreateLayer());
            var provider = PointsSample.CreateRandomPointsProvider(map.Envelope);
            map.Layers.Add(CreateStackedLabelLayer(provider, LabelColumn));
            map.Layers.Add(CreateLayer(provider));
            return map;
        }

        private static ILayer CreateStackedLabelLayer(IProvider provider, string labelColumn)
        {
            return new MemoryLayer
            {
                DataSource = new StackedLabelProvider(provider, new LabelStyle
                {
                    BackColor = new Brush {Color = new Color(240, 240, 240, 128)},
                    ForeColor = new Color(50, 50, 50),
                    LabelColumn = labelColumn,
                    Font = new Font {  FontFamily = "Cambria", Size = 14}
                }),
                Style = null
            };
        }

        private static ILayer CreateLayer(IProvider dataSource)
        {
            return new Layer("Point Layer")
            {
                DataSource = dataSource,
                Style = new SymbolStyle
                {
                    SymbolScale = 0.85,
                    Fill = new Brush(new Color(190, 100, 130, 210)),
                    Outline = new Pen(new Color(140, 50, 100, 210))
                }
            };
        }
    }
}
{'fraction_non_alphanumeric': 0.07865835559513208, 'fraction_numerical': 0.026714158504007122, 'mean_word_length': 1.4088634739099357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '253455', 'n_tokens_mistral': 952, 'n_tokens_neox': 791, 'n_words': 206}