"Fossies" - the Fresh Open Source Software Archive

Member "pango-1.44.7/pango/pango-engine.c" (25 Oct 2019, 3306 Bytes) of package /linux/misc/pango-1.44.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pango-engine.c" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.43.0_vs_1.44.0.

    1 /* Pango
    2  * pango-engine.c: Engines for script and language specific processing
    3  *
    4  * Copyright (C) 2003 Red Hat Software
    5  *
    6  * This library is free software; you can redistribute it and/or
    7  * modify it under the terms of the GNU Library General Public
    8  * License as published by the Free Software Foundation; either
    9  * version 2 of the License, or (at your option) any later version.
   10  *
   11  * This library is distributed in the hope that it will be useful,
   12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14  * Library General Public License for more details.
   15  *
   16  * You should have received a copy of the GNU Library General Public
   17  * License along with this library; if not, write to the
   18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   19  * Boston, MA 02111-1307, USA.
   20  */
   21 
   22 /**
   23  * SECTION:engines
   24  * @short_description:Language-specific and rendering-system-specific processing
   25  * @title:Engines
   26  *
   27  * Pango used to have a module architecture in which the language-specific
   28  * and render-system-specific components are provided by loadable
   29  * modules.
   30  *
   31  * This is no longer the case, and all the APIs related
   32  * to modules and engines should not be used anymore.
   33  *
   34  * Deprecated: 1.38
   35  */
   36 /**
   37  * SECTION:pango-engine-lang
   38  * @short_description:Rendering-system independent script engines
   39  * @title:PangoEngineLang
   40  * @stability:Unstable
   41  *
   42  * The <firstterm>language engines</firstterm> are rendering-system independent
   43  * engines that determine line, word, and character breaks for character strings.
   44  * These engines are used in pango_break().
   45  *
   46  * Deprecated: 1.38
   47  */
   48 /**
   49  * SECTION:pango-engine-shape
   50  * @short_description:Rendering-system dependent script engines
   51  * @title:PangoEngineShape
   52  * @stability:Unstable
   53  *
   54  * The <firstterm>shape engines</firstterm> are rendering-system dependent
   55  * engines that convert character strings into glyph strings.
   56  * These engines are used in pango_shape().
   57  *
   58  * Deprecated: 1.38
   59  */
   60 #include "config.h"
   61 
   62 #include "pango-engine.h"
   63 #include "pango-impl-utils.h"
   64 
   65 
   66 G_DEFINE_ABSTRACT_TYPE (PangoEngine, pango_engine, G_TYPE_OBJECT);
   67 
   68 static void
   69 pango_engine_init (PangoEngine *self)
   70 {
   71 }
   72 
   73 static void
   74 pango_engine_class_init (PangoEngineClass *klass)
   75 {
   76 }
   77 
   78 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   79 G_DEFINE_ABSTRACT_TYPE (PangoEngineLang, pango_engine_lang, PANGO_TYPE_ENGINE);
   80 G_GNUC_END_IGNORE_DEPRECATIONS
   81 
   82 static void
   83 pango_engine_lang_init (PangoEngineLang *self)
   84 {
   85 }
   86 
   87 static void
   88 pango_engine_lang_class_init (PangoEngineLangClass *klass)
   89 {
   90 }
   91 
   92 
   93 static PangoCoverageLevel
   94 pango_engine_shape_real_covers (PangoEngineShape *engine G_GNUC_UNUSED,
   95                 PangoFont        *font,
   96                 PangoLanguage    *language,
   97                 gunichar          wc)
   98 {
   99   PangoCoverage *coverage = pango_font_get_coverage (font, language);
  100   PangoCoverageLevel result = pango_coverage_get (coverage, wc);
  101 
  102   pango_coverage_unref (coverage);
  103 
  104   return result;
  105 }
  106 
  107 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  108 G_DEFINE_ABSTRACT_TYPE (PangoEngineShape, pango_engine_shape, PANGO_TYPE_ENGINE);
  109 G_GNUC_END_IGNORE_DEPRECATIONS
  110 
  111 static void
  112 pango_engine_shape_init (PangoEngineShape *klass)
  113 {
  114 }
  115 
  116 static void
  117 pango_engine_shape_class_init (PangoEngineShapeClass *class)
  118 {
  119   class->covers = pango_engine_shape_real_covers;
  120 }