2018-02-12 13:02:06 -08:00
|
|
|
import efl_gfx_types;
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Text_Font_Weight {
|
2017-05-22 07:36:41 -07:00
|
|
|
[[Type of font weight]]
|
2017-05-31 08:19:57 -07:00
|
|
|
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]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Text_Font_Width {
|
2017-05-22 07:36:41 -07:00
|
|
|
[[Type of font width]]
|
2017-05-31 08:30:28 -07:00
|
|
|
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]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Text_Font_Slant {
|
2017-05-22 07:36:41 -07:00
|
|
|
[[Type of font slant]]
|
2017-05-31 08:30:28 -07:00
|
|
|
normal, [[Normal font slant]]
|
|
|
|
oblique, [[Oblique font slant]]
|
|
|
|
italic, [[Italic font slant]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
|
2017-09-25 02:34:22 -07:00
|
|
|
/* FIXME: It needs to support "normal" option for non-color bitmap font.
|
|
|
|
For supporting "normal" option, S/W glyph drawing engine should be updated.
|
|
|
|
*/
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Text_Font_Bitmap_Scalable {
|
2017-09-25 02:34:22 -07:00
|
|
|
[[Scalable of bitmap fonts
|
|
|
|
]]
|
|
|
|
none = 0, [[Disable scalable feature for bitmap fonts.]]
|
|
|
|
color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]]
|
|
|
|
}
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
interface @beta Efl.Text_Font {
|
2017-05-22 07:36:41 -07:00
|
|
|
[[Font settings of the text
|
|
|
|
]]
|
2019-05-09 07:16:42 -07:00
|
|
|
c_prefix: efl_text;
|
2017-05-22 07:36:41 -07:00
|
|
|
methods {
|
2019-11-27 23:55:26 -08:00
|
|
|
@property font_family {
|
|
|
|
[[The font family, filename for a given text object.
|
2018-02-12 12:34:01 -08:00
|
|
|
|
2019-11-27 23:55:26 -08:00
|
|
|
This property controls the font name of a text object.
|
2019-09-13 03:25:49 -07:00
|
|
|
The font string has to follow fontconfig's convention for
|
|
|
|
naming fonts, as it's the underlying library used to query system
|
2019-11-28 09:13:47 -08:00
|
|
|
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
|
2019-09-13 03:25:49 -07:00
|
|
|
file.
|
2018-02-12 12:34:01 -08:00
|
|
|
|
2019-09-13 03:25:49 -07:00
|
|
|
When reading it, the font name string is still owned by
|
2019-11-28 09:13:47 -08:00
|
|
|
EFL and should not be freed.
|
2019-09-13 03:25:49 -07:00
|
|
|
See also @.font_source.
|
|
|
|
]]
|
|
|
|
set {
|
2018-02-12 12:34:01 -08:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
2017-05-22 07:36:41 -07:00
|
|
|
values {
|
2018-02-12 12:34:01 -08:00
|
|
|
font: string; [[The font family name or filename.]]
|
2019-11-27 23:55:26 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@property font_size {
|
|
|
|
[[The font size for a given text object.
|
|
|
|
|
|
|
|
This property controls the font size of a text object.
|
|
|
|
]]
|
|
|
|
set {}
|
|
|
|
get {}
|
|
|
|
values {
|
2018-02-12 12:34:01 -08:00
|
|
|
size: Efl.Font.Size; [[The font size, in points.]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
2019-11-27 23:55:26 -08:00
|
|
|
|
2017-05-22 07:36:41 -07:00
|
|
|
@property font_source {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[The font (source) file to be used on a given text object.
|
2017-05-22 07:36:41 -07:00
|
|
|
|
2019-09-13 03:25:49 -07:00
|
|
|
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.
|
2018-02-12 12:34:01 -08:00
|
|
|
|
2019-11-27 23:55:26 -08:00
|
|
|
See also @.font_family.
|
2019-09-13 03:25:49 -07:00
|
|
|
]]
|
|
|
|
set {
|
2018-02-12 12:34:01 -08:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
2017-05-22 07:36:41 -07:00
|
|
|
values {
|
2018-02-12 12:34:01 -08:00
|
|
|
font_source: string; [[The font file's path.]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@property font_fallbacks {
|
|
|
|
[[Comma-separated list of font fallbacks
|
|
|
|
|
|
|
|
Will be used in case the primary font isn't available.
|
|
|
|
]]
|
|
|
|
values {
|
2017-08-31 06:26:17 -07:00
|
|
|
font_fallbacks: string; [[Font name fallbacks]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@property font_weight {
|
|
|
|
[[Type of weight of the displayed font
|
|
|
|
|
2018-04-06 04:30:40 -07:00
|
|
|
Default is @Efl.Text_Font_Weight.normal\.
|
2017-05-22 07:36:41 -07:00
|
|
|
]]
|
|
|
|
values {
|
2018-04-06 04:30:40 -07:00
|
|
|
font_weight: Efl.Text_Font_Weight; [[Font weight]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@property font_slant {
|
|
|
|
[[Type of slant of the displayed font
|
|
|
|
|
2018-04-06 04:30:40 -07:00
|
|
|
Default is @Efl.Text_Font_Slant.normal\.
|
2017-05-22 07:36:41 -07:00
|
|
|
]]
|
|
|
|
values {
|
2018-04-06 04:30:40 -07:00
|
|
|
style: Efl.Text_Font_Slant; [[Font slant]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@property font_width {
|
|
|
|
[[Type of width of the displayed font
|
|
|
|
|
2018-04-06 04:30:40 -07:00
|
|
|
Default is @Efl.Text_Font_Width.normal\.
|
2017-05-22 07:36:41 -07:00
|
|
|
]]
|
|
|
|
values {
|
2018-04-06 04:30:40 -07:00
|
|
|
width: Efl.Text_Font_Width; [[Font width]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@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 {
|
2017-08-31 06:26:17 -07:00
|
|
|
lang: string; [[Language]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
2017-09-25 02:34:22 -07:00
|
|
|
|
|
|
|
@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)
|
|
|
|
|
2018-04-06 04:30:40 -07:00
|
|
|
Default is @Efl.Text_Font_Bitmap_Scalable.none\.
|
2017-09-25 02:34:22 -07:00
|
|
|
]]
|
|
|
|
values {
|
2018-04-06 04:30:40 -07:00
|
|
|
scalable: Efl.Text_Font_Bitmap_Scalable; [[Scalable]]
|
2017-09-25 02:34:22 -07:00
|
|
|
}
|
|
|
|
}
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|