<commit_before>﻿using System.IO;
using SharpexGL.Framework.Rendering.Font;

namespace SharpexGL.Framework.Content.Serialization
{
    public class TypefaceSerializer : ContentSerializer<Typeface>
    {
        /// <summary>
        /// Reads a value from the given Reader.
        /// </summary>
        /// <param name="reader">The BinaryReader.</param>
        /// <returns></returns>
        public override Typeface Read(BinaryReader reader)
        {
            var typeface = new Typeface
            {
                FamilyName = reader.ReadString(),
                Size = reader.ReadInt32(),
                Style = (TypefaceStyle) reader.ReadInt32()
            };
            return typeface;
        }
        /// <summary>
        /// Writes a specified value.
        /// </summary>
        /// <param name="writer">The BinaryWriter.</param>
        /// <param name="value">The Value.</param>
        public override void Write(BinaryWriter writer, Typeface value)
        {
            writer.Write(value.FamilyName);
            writer.Write(value.Size);
            writer.Write((int)value.Style);<commit_msg>Fixed Typeface loading<commit_after>﻿using System.IO;
using SharpexGL.Framework.Rendering.Font;

namespace SharpexGL.Framework.Content.Serialization
{
    public class TypefaceSerializer : ContentSerializer<Typeface>
    {
        /// <summary>
        /// Reads a value from the given Reader.
        /// </summary>
        /// <param name="reader">The BinaryReader.</param>
        /// <returns></returns>
        public override Typeface Read(BinaryReader reader)
        {
            var typeface = new Typeface
            {
                FamilyName = reader.ReadString(),
                Size = reader.ReadSingle(),
                Style = (TypefaceStyle) reader.ReadInt32()
            };
            return typeface;
        }
        /// <summary>
        /// Writes a specified value.
        /// </summary>
        /// <param name="writer">The BinaryWriter.</param>
        /// <param name="value">The Value.</param>
        public override void Write(BinaryWriter writer, Typeface value)
        {
            writer.Write(value.FamilyName);
            writer.Write(value.Size);
            writer.Write((int)value.Style);
{'fraction_non_alphanumeric': 0.12180052956751986, 'fraction_numerical': 0.00264783759929391, 'mean_word_length': 1.809169764560099, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '2771357', 'n_tokens_mistral': 580, 'n_tokens_neox': 564, 'n_words': 127}