<commit_before>#include <cairo/cairo.h>
#include <pango/pangocairo.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "log.h"

PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text) {
	PangoLayout *layout = pango_cairo_create_layout(cairo);
	pango_layout_set_text(layout, text, -1);
	PangoFontDescription *desc = pango_font_description_from_string(font);
	pango_layout_set_font_description(layout, desc);
	pango_layout_set_single_paragraph_mode(layout, 1);<commit_msg>Add support for pango markup<commit_after>#include <cairo/cairo.h>
#include <pango/pangocairo.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "log.h"

PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text) {
	PangoLayout *layout = pango_cairo_create_layout(cairo);
	pango_layout_set_markup(layout, text, -1);
	PangoFontDescription *desc = pango_font_description_from_string(font);
	pango_layout_set_font_description(layout, desc);
	pango_layout_set_single_paragraph_mode(layout, 1);
{'fraction_non_alphanumeric': 0.12143514259429623, 'fraction_numerical': 0.0036798528058877645, 'mean_word_length': 8.628318584070797, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5776996', 'n_tokens_mistral': 420, 'n_tokens_neox': 412, 'n_words': 75}