w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gr_features.cpp File Reference
#include "graphite2/Font.h"
#include "inc/Face.h"
#include "inc/FeatureMap.h"
#include "inc/FeatureVal.h"
#include "inc/NameTable.h"
Include dependency graph for gr_features.cpp:

Go to the source code of this file.

Functions

gr_uint16 gr_fref_feature_value (const gr_feature_ref *pfeatureref, const gr_feature_val *feats)
 
int gr_fref_set_feature_value (const gr_feature_ref *pfeatureref, gr_uint16 val, gr_feature_val *pDest)
 
gr_uint32 gr_fref_id (const gr_feature_ref *pfeatureref)
 
gr_uint16 gr_fref_n_values (const gr_feature_ref *pfeatureref)
 
gr_int16 gr_fref_value (const gr_feature_ref *pfeatureref, gr_uint16 settingno)
 
voidgr_fref_label (const gr_feature_ref *pfeatureref, gr_uint16 *langId, gr_encform utf, gr_uint32 *length)
 
voidgr_fref_value_label (const gr_feature_ref *pfeatureref, gr_uint16 setting, gr_uint16 *langId, gr_encform utf, gr_uint32 *length)
 
void gr_label_destroy (void *label)
 
gr_feature_valgr_featureval_clone (const gr_feature_val *pfeatures)
 
void gr_featureval_destroy (gr_feature_val *p)
 

Function Documentation

◆ gr_featureval_clone()

gr_feature_val* gr_featureval_clone ( const gr_feature_val pfeatures)

Copies a gr_feature_val

Definition at line 127 of file gr_features.cpp.

◆ gr_featureval_destroy()

void gr_featureval_destroy ( gr_feature_val pfeatures)

Destroys a gr_feature_val

Definition at line 132 of file gr_features.cpp.

References p.

◆ gr_fref_feature_value()

gr_uint16 gr_fref_feature_value ( const gr_feature_ref pfeatureref,
const gr_feature_val feats 
)

get a feature value

Returns
value of specific feature or 0 if any problems.
Parameters
pfeaturerefgr_feature_ref to the feature
featsgr_feature_val containing all the values

Definition at line 38 of file gr_features.cpp.

References graphite2::FeatureRef::getFeatureVal().

Referenced by getGraphiteFeatureDefaultSetting().

◆ gr_fref_id()

gr_uint32 gr_fref_id ( const gr_feature_ref pfeatureref)

Returns the id tag for a gr_feature_ref

Definition at line 54 of file gr_features.cpp.

References graphite2::FeatureRef::getId().

Referenced by findGraphiteFeatureNamed(), and getGraphiteFeatureCode().

◆ gr_fref_label()

void* gr_fref_label ( const gr_feature_ref pfeatureref,
gr_uint16 langId,
enum gr_encform  utf,
gr_uint32 length 
)

Returns a string of the UI name of a feature

Returns
string of the UI name, in the encoding form requested. Call gr_label_destroy() after use.
Parameters
pfeaturerefgr_feature_ref of the feature
langIdThis is a pointer since the face may not support a string in the requested language. The actual language of the string is returned in langId
utfEncoding form for the string
lengthUsed to return the length of the string returned in bytes.

Definition at line 81 of file gr_features.cpp.

References graphite2::FeatureRef::getFace(), graphite2::FeatureRef::getNameId(), label, length, fc-lang::names, graphite2::Face::nameTable(), and NULL.

Referenced by findGraphiteFeatureNamed(), and getGraphiteFeatureLabel().

◆ gr_fref_n_values()

gr_uint16 gr_fref_n_values ( const gr_feature_ref pfeatureref)

Returns number of values a feature may take, given a gr_feature_ref

Definition at line 63 of file gr_features.cpp.

References graphite2::FeatureRef::getNumSettings().

Referenced by countGraphiteFeatureSettings(), findGraphiteFeatureSettingNamed(), and getGraphiteFeatureSettingLabel().

◆ gr_fref_set_feature_value()

int gr_fref_set_feature_value ( const gr_feature_ref pfeatureref,
gr_uint16  val,
gr_feature_val pDest 
)

set a feature value

Returns
false if there were any problems (value out of range, etc.)
Parameters
pfeaturerefgr_feature_ref to the feature
valvalue to set the feature to
pDestthe gr_feature_val containing all the values for all the features

Definition at line 46 of file gr_features.cpp.

References graphite2::FeatureRef::applyValToFeature().

Referenced by initGraphiteBreaking().

◆ gr_fref_value()

gr_int16 gr_fref_value ( const gr_feature_ref pfeatureref,
gr_uint16  settingno 
)

Returns the value associated with a particular value in a feature

Returns
value
Parameters
pfeaturerefgr_feature_ref of the feature of interest
settingnoIndex up to the return value of gr_fref_n_values() of the value

Definition at line 71 of file gr_features.cpp.

References graphite2::FeatureRef::getNumSettings(), and graphite2::FeatureRef::getSettingValue().

Referenced by findGraphiteFeatureSettingNamed(), getGraphiteFeatureSettingCode(), and getGraphiteFeatureSettingLabel().

◆ gr_fref_value_label()

void* gr_fref_value_label ( const gr_feature_ref pfeatureref,
gr_uint16  settingno,
gr_uint16 langId,
enum gr_encform  utf,
gr_uint32 length 
)

Return a UI string for a possible value of a feature

Returns
string of the UI name, in the encoding form requested. nul terminated. Call gr_label_destroy() after use.
Parameters
pfeaturerefgr_feature_ref of the feature
settingnoValue setting index
langIdThis is a pointer to the requested language. The requested language id is replaced by the actual language id of the string returned.
utfEncoding form for the string
lengthReturns the length of the string returned in bytes.

Definition at line 101 of file gr_features.cpp.

References graphite2::FeatureRef::getFace(), graphite2::FeatureRef::getNumSettings(), graphite2::FeatureRef::getSettingName(), label, length, fc-lang::names, graphite2::Face::nameTable(), and NULL.

Referenced by findGraphiteFeatureSettingNamed(), and getGraphiteFeatureSettingLabel().

◆ gr_label_destroy()

void gr_label_destroy ( void label)

Destroy a previously returned label string

Definition at line 122 of file gr_features.cpp.

References free, and label.

Referenced by findGraphiteFeatureNamed(), findGraphiteFeatureSettingNamed(), and grprintfontname().