forked from enlightenment/efl
173 lines
4.9 KiB
Plaintext
173 lines
4.9 KiB
Plaintext
import efl_gfx_types;
|
|
enum @beta Efl.Text_Font_Weight {
|
|
[[Type of font weight]]
|
|
normal, [[Normal font weight]]
|
|
thin, [[Thin font weight]]
|
|
ultralight, [[Ultralight font weight]]
|
|
extralight, [[Extralight font weight]]
|
|
light, [[Light font weight]]
|
|
book, [[Book font weight]]
|
|
medium, [[Medium font weight]]
|
|
semibold, [[Semibold font weight]]
|
|
bold, [[Bold font weight]]
|
|
ultrabold, [[Ultrabold font weight]]
|
|
extrabold, [[Extrabold font weight]]
|
|
black, [[Black font weight]]
|
|
extrablack, [[Extrablack font weight]]
|
|
}
|
|
|
|
enum @beta Efl.Text_Font_Width {
|
|
[[Type of font width]]
|
|
normal, [[Normal font width]]
|
|
ultracondensed, [[Ultracondensed font width]]
|
|
extracondensed, [[Extracondensed font width]]
|
|
condensed, [[Condensed font width]]
|
|
semicondensed, [[Semicondensed font width]]
|
|
semiexpanded, [[Semiexpanded font width]]
|
|
expanded, [[Expanded font width]]
|
|
extraexpanded, [[Extraexpanded font width]]
|
|
ultraexpanded, [[Ultraexpanded font width]]
|
|
}
|
|
|
|
enum @beta Efl.Text_Font_Slant {
|
|
[[Type of font slant]]
|
|
normal, [[Normal font slant]]
|
|
oblique, [[Oblique font slant]]
|
|
italic, [[Italic font slant]]
|
|
}
|
|
|
|
/* FIXME: It needs to support "normal" option for non-color bitmap font.
|
|
For supporting "normal" option, S/W glyph drawing engine should be updated.
|
|
*/
|
|
enum @beta Efl.Text_Font_Bitmap_Scalable {
|
|
[[Scalable of bitmap fonts
|
|
]]
|
|
none = 0, [[Disable scalable feature for bitmap fonts.]]
|
|
color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]]
|
|
}
|
|
|
|
interface @beta Efl.Text_Font {
|
|
[[Font settings of the text
|
|
]]
|
|
c_prefix: efl_text;
|
|
methods {
|
|
@property font_family {
|
|
[[The font family, filename for a given text object.
|
|
|
|
This property controls the font name of a text object.
|
|
The font string has to follow fontconfig's convention for
|
|
naming fonts, as it's the underlying library used to query system
|
|
fonts by EFL (see the $[fc-list] command's output, on your system,
|
|
to get an idea). Alternatively, you can use the full path to a font
|
|
file.
|
|
|
|
When reading it, the font name string is still owned by
|
|
EFL and should not be freed.
|
|
See also @.font_source.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
font: string; [[The font family name or filename.]]
|
|
}
|
|
}
|
|
|
|
@property font_size {
|
|
[[The font size for a given text object.
|
|
|
|
This property controls the font size of a text object.
|
|
]]
|
|
set {}
|
|
get {}
|
|
values {
|
|
size: Efl.Font.Size; [[The font size, in points.]]
|
|
}
|
|
}
|
|
|
|
@property font_source {
|
|
[[The font (source) file to be used on a given text object.
|
|
|
|
This function allows the font file to be explicitly set for a
|
|
given text object, overriding system lookup, which will first
|
|
occur in the given file's contents.
|
|
|
|
See also @.font_family.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
font_source: string; [[The font file's path.]]
|
|
}
|
|
}
|
|
|
|
@property font_fallbacks {
|
|
[[Comma-separated list of font fallbacks
|
|
|
|
Will be used in case the primary font isn't available.
|
|
]]
|
|
values {
|
|
font_fallbacks: string; [[Font name fallbacks]]
|
|
}
|
|
}
|
|
|
|
@property font_weight {
|
|
[[Type of weight of the displayed font
|
|
|
|
Default is @Efl.Text_Font_Weight.normal\.
|
|
]]
|
|
values {
|
|
font_weight: Efl.Text_Font_Weight; [[Font weight]]
|
|
}
|
|
}
|
|
|
|
@property font_slant {
|
|
[[Type of slant of the displayed font
|
|
|
|
Default is @Efl.Text_Font_Slant.normal\.
|
|
]]
|
|
values {
|
|
style: Efl.Text_Font_Slant; [[Font slant]]
|
|
}
|
|
}
|
|
|
|
@property font_width {
|
|
[[Type of width of the displayed font
|
|
|
|
Default is @Efl.Text_Font_Width.normal\.
|
|
]]
|
|
values {
|
|
width: Efl.Text_Font_Width; [[Font width]]
|
|
}
|
|
}
|
|
|
|
@property font_lang {
|
|
[[Specific language of the displayed font
|
|
|
|
This is used to lookup fonts suitable to the specified language, as
|
|
well as helping the font shaper backend.
|
|
The language $lang can be either a code e.g "en_US",
|
|
"auto" to use the system locale, or "none".
|
|
]]
|
|
values {
|
|
lang: string; [[Language]]
|
|
}
|
|
}
|
|
|
|
@property font_bitmap_scalable {
|
|
[[The bitmap fonts have fixed size glyphs for several available sizes.
|
|
Basically, it is not scalable. But, it needs to be scalable for some use cases.
|
|
(ex. colorful emoji fonts)
|
|
|
|
Default is @Efl.Text_Font_Bitmap_Scalable.none\.
|
|
]]
|
|
values {
|
|
scalable: Efl.Text_Font_Bitmap_Scalable; [[Scalable]]
|
|
}
|
|
}
|
|
}
|
|
}
|