Orthography

Orthography — Font language support

Functions

Properties

gdouble coverage Read / Write
gchar * name Read / Write
gchar * native Read / Write
gchar * sample Read / Write
JsonObject * source-object Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── FontManagerJsonProxy
        ╰── FontManagerOrthography

Includes

#include <font-manager-orthography.h>

Description

A FontManagerOrthography holds information about the extent to which a font supports a particular language.

In addition to the english name, it includes the untranslated name of the orthography along with a pangram or sample string for the language, if available.

Functions

font_manager_get_orthography_results ()

JsonObject *
font_manager_get_orthography_results (JsonObject *font);

The JsonObject returned will have the following structure:

1
2
3
4
5
6
7
8
9
10
11
{
  "Basic Latin": {
    "filter": [65, 66, ... 122],
    "name": "Basic Latin",
    "native": "Basic Latin",
    "sample": "AaBbCcGgQqRrSsZz",
    "coverage": 100.0
  },
  ...,
  "sample" : null
}

The returned object contains a member for each orthography detected in font .

sample will be set to NULL if the font supports rendering the sample string returned by font_manager_get_localized_pangram, otherwise sample will be set to the sample string from the member with the highest coverage, if that should fail then sample will be set to a string randomly generated from the characters available in font .

Parameters

font

JsonObject.

[nullable][transfer none]

Returns

JsonObject containing orthography results.

[nullable][transfer full]


font_manager_get_sample_string ()

gchar *
font_manager_get_sample_string (JsonObject *font);

Parameters

font

JsonObject

 

Returns

A newly allocated string that must be freed with g_free or NULL if the systems default language is supported.

[nullable][transfer full]


font_manager_orthography_new ()

FontManagerOrthography *
font_manager_orthography_new (JsonObject *orthography);

orthography should be one of the members of the object returned by font_manager_get_orthography_results()

Parameters

orthography

JsonObject containing orthography results

 

Returns

A newly created FontManagerOrthography. Free the returned object using g_object_unref().

[transfer full]


font_manager_orthography_get_filter ()

GList *
font_manager_orthography_get_filter (FontManagerOrthography *self);

Parameters

Returns

GList containing codepoints. Free the returned GList using g_list_free().

[element-type uint][transfer container][nullable]

Types and Values

FONT_MANAGER_TYPE_ORTHOGRAPHY

#define FONT_MANAGER_TYPE_ORTHOGRAPHY (font_manager_orthography_get_type ())

FONT_MANAGER_START_RANGE_PAIR

#define FONT_MANAGER_START_RANGE_PAIR 0x0002

FONT_MANAGER_END_OF_DATA

#define FONT_MANAGER_END_OF_DATA 0x0000

FontManagerOrthography

typedef struct _FontManagerOrthography FontManagerOrthography;

Property Details

The “coverage” property

  “coverage”                 gdouble

Coverage as a percentage.

Owner: FontManagerOrthography

Flags: Read / Write

Default value: 0


The “name” property

  “name”                     gchar *

English name for orthography.

Owner: FontManagerOrthography

Flags: Read / Write

Default value: NULL


The “native” property

  “native”                   gchar *

Native name for orthography.

Owner: FontManagerOrthography

Flags: Read / Write

Default value: NULL


The “sample” property

  “sample”                   gchar *

Pangram or sample string.

Owner: FontManagerOrthography

Flags: Read / Write

Default value: NULL


The “source-object” property

  “source-object”            JsonObject *

JsonObject source for this class.

Owner: FontManagerOrthography

Flags: Read / Write