<commit_before>/*
 * This file is part of libbluray
 * Copyright (C) 2013  <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see
 * <http://www.gnu.org/licenses/>.
 */

#if HAVE_CONFIG_H
#include "config.h"
#endif

#include "util/macro.h"
#include "util/logging.h"
#include "libbluray/bluray.h"          /* bd_char_code_e */

#include <stdint.h>

#ifdef HAVE_FT2
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_SYNTHESIS_H
#endif

#include "textst_render.h"

/*
 *
 */

#define TEXTST_ERROR(...) BD_DEBUG(DBG_GC | DBG_CRIT, __VA_ARGS__)
#define TEXTST_TRACE(...) BD_DEBUG(DBG_GC,            __VA_ARGS__)

/*
 * data
 */

typedef struct {
  FT_Face  face;
  void    *mem;
} FONT_DATA;

struct textst_render {
#ifdef HAVE_FT2
  FT_Library     ft_lib;

  unsigned       font_count;
  FONT_DATA     *font;<commit_msg>Fix build without freetype support.<commit_after>/*
 * This file is part of libbluray
 * Copyright (C) 2013  <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see
 * <http://www.gnu.org/licenses/>.
 */

#if HAVE_CONFIG_H
#include "config.h"
#endif

#include "util/macro.h"
#include "util/logging.h"
#include "libbluray/bluray.h"          /* bd_char_code_e */

#include <stdint.h>

#ifdef HAVE_FT2
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_SYNTHESIS_H
#endif

#include "textst_render.h"

/*
 *
 */

#define TEXTST_ERROR(...) BD_DEBUG(DBG_GC | DBG_CRIT, __VA_ARGS__)
#define TEXTST_TRACE(...) BD_DEBUG(DBG_GC,            __VA_ARGS__)

/*
 * data
 */

typedef struct {
#ifdef HAVE_FT2
  FT_Face  face;
  void    *mem;
#endif
} FONT_DATA;

struct textst_render {
#ifdef HAVE_FT2
  FT_Library     ft_lib;

  unsigned       font_count;
  FONT_DATA     *font;
{'fraction_non_alphanumeric': 0.09574835810577255, 'fraction_numerical': 0.006567576909782233, 'mean_word_length': 3.55748031496063, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3615496', 'n_tokens_mistral': 969, 'n_tokens_neox': 935, 'n_words': 338}