<commit_before>﻿using System;
using Avalonia.Metadata;

namespace Avalonia.Media
{
    [Unstable]
    public interface IGlyphTypeface : IDisposable
    {
        /// <summary>
        ///     Gets the number of glyphs held by this glyph typeface. 
        /// </summary>
        int GlyphCount { get; }

        /// <summary>
        ///     Gets the font metrics.
        /// </summary>
        /// <returns>
        ///     The font metrics.
        /// </returns>
        FontMetrics Metrics { get; }

        /// <summary>
        ///     Gets the algorithmic style simulations applied to this glyph typeface.
        /// </summary>
        FontSimulations FontSimulations { get; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="glyph"></param>
        /// <param name="metrics"></param>
        /// <returns></returns>
        bool TryGetGlyphMetrics(ushort glyph, out GlyphMetrics metrics);
        
        /// <summary>
        ///     Returns an glyph index for the specified codepoint.
        /// </summary>
        /// <remarks>
        ///     Returns <c>0</c> if a glyph isn't found.
        /// </remarks>
        /// <param name="codepoint">The codepoint.</param>
        /// <returns>
        ///     A glyph index.
        /// </returns>
        ushort GetGlyph(uint codepoint);

        /// <summary>
        ///     Tries to get an glyph index for specified codepoint.
        /// </summary>
        /// <param name="codepoint">The codepoint.</param>
        /// <param name="glyph">A glyph index.</param>
        /// <returns>
        ///     <c>true</c> if an glyph index was found, <c>false</c> otherwise.
        /// </returns>
        bool TryGetGlyph(uint codepoint, out ushort glyph);

        /// <summary>
        ///     Returns an array of glyph indices. Codepoints that are not represented by the font are returned as <code>0</code>.
        /// </summary>
        /// <param name="codepoints">The codepoints to map.</param>
        /// <returns>
        ///     An array of glyph indices.
        /// </returns><commit_msg>Fix xml comment<commit_after>﻿using System;
using Avalonia.Metadata;

namespace Avalonia.Media
{
    [Unstable]
    public interface IGlyphTypeface : IDisposable
    {
        /// <summary>
        ///     Gets the number of glyphs held by this glyph typeface. 
        /// </summary>
        int GlyphCount { get; }

        /// <summary>
        ///     Gets the font metrics.
        /// </summary>
        /// <returns>
        ///     The font metrics.
        /// </returns>
        FontMetrics Metrics { get; }

        /// <summary>
        ///     Gets the algorithmic style simulations applied to this glyph typeface.
        /// </summary>
        FontSimulations FontSimulations { get; }

        /// <summary>
        ///     Tries to get a glyph's metrics in em units.
        /// </summary>
        /// <param name="glyph">The glyph id.</param>
        /// <param name="metrics">The glyph metrics.</param>
        /// <returns>
        ///   <c>true</c> if an glyph's metrics was found, <c>false</c> otherwise.
        /// </returns>
        bool TryGetGlyphMetrics(ushort glyph, out GlyphMetrics metrics);
        
        /// <summary>
        ///     Returns an glyph index for the specified codepoint.
        /// </summary>
        /// <remarks>
        ///     Returns <c>0</c> if a glyph isn't found.
        /// </remarks>
        /// <param name="codepoint">The codepoint.</param>
        /// <returns>
        ///     A glyph index.
        /// </returns>
        ushort GetGlyph(uint codepoint);

        /// <summary>
        ///     Tries to get an glyph index for specified codepoint.
        /// </summary>
        /// <param name="codepoint">The codepoint.</param>
        /// <param name="glyph">A glyph index.</param>
        /// <returns>
        ///     <c>true</c> if an glyph index was found, <c>false</c> otherwise.
        /// </returns>
        bool TryGetGlyph(uint codepoint, out ushort glyph);

        /// <summary>
        ///     Returns an array of glyph indices. Codepoints that are not represented by the font are returned as <code>0</code>.
        /// </summary>
        /// <param name="codepoints">The codepoints to map.</param>
        /// <returns>
        ///     An array of glyph indices.
        /// </returns>
{'fraction_non_alphanumeric': 0.1487849610270518, 'fraction_numerical': 0.0009170105456212746, 'mean_word_length': 1.474758933635848, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '7546005', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1196, 'n_words': 354}