2017-05-22 07:36:41 -07:00
|
|
|
// src/lib/efl/interfaces/efl_text_font.eo
|
|
|
|
|
|
|
|
enum Efl.Text.Font.Weight {
|
|
|
|
[[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
|
|
|
}
|
|
|
|
|
|
|
|
enum Efl.Text.Font.Width {
|
|
|
|
[[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
|
|
|
}
|
|
|
|
|
|
|
|
enum Efl.Text.Font.Slant {
|
|
|
|
[[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.
|
|
|
|
*/
|
|
|
|
enum Efl.Text.Font.Bitmap_Scalable {
|
|
|
|
[[Scalable of bitmap fonts
|
|
|
|
|
|
|
|
@since 1.21
|
|
|
|
]]
|
|
|
|
none = 0, [[Disable scalable feature for bitmap fonts.]]
|
|
|
|
color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]]
|
|
|
|
}
|
|
|
|
|
2017-05-22 07:36:41 -07:00
|
|
|
interface Efl.Text.Font {
|
|
|
|
[[Font settings of the text
|
|
|
|
|
|
|
|
@since 1.20
|
|
|
|
]]
|
2017-06-11 14:16:40 -07:00
|
|
|
eo_prefix: efl_text;
|
2017-05-22 07:36:41 -07:00
|
|
|
methods {
|
|
|
|
@property font {
|
2018-02-12 12:34:01 -08:00
|
|
|
set {
|
|
|
|
[[Set the font family, filename and size for a given text object.
|
|
|
|
|
|
|
|
This function allows the font name and size of a text object to
|
|
|
|
be set. The font string has to follow fontconfig's convention for
|
|
|
|
naming fonts, as it's the underlying library used to query system
|
|
|
|
fonts by Evas (see the fc-list command's output, on your system,
|
|
|
|
to get an idea). Alternatively, youe can use the full path to a font
|
|
|
|
file.
|
|
|
|
|
|
|
|
See also @.font.get, @.font_source.get.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Retrieve the font family and size in use on a given text object.
|
|
|
|
|
|
|
|
This function allows the font name and size of a text object to
|
|
|
|
be queried. Remember that the font name string is still owned by
|
|
|
|
Evas and should not have free() called on it by the caller of the
|
|
|
|
function.
|
|
|
|
|
|
|
|
See also @.font.set.
|
|
|
|
]]
|
|
|
|
}
|
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.]]
|
|
|
|
size: Efl.Font.Size; [[The font size, in points.]]
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property font_source {
|
2018-02-12 12:34:01 -08:00
|
|
|
set {
|
|
|
|
[[Set the font (source) file to be used on a given text object.
|
2017-05-22 07:36:41 -07:00
|
|
|
|
2018-02-12 12:34:01 -08: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.
|
|
|
|
|
|
|
|
See also @.font.set.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Get the font file's path which is being used on a given text
|
|
|
|
object.
|
|
|
|
|
|
|
|
See @.font.get for more details.
|
|
|
|
]]
|
|
|
|
}
|
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
|
|
|
|
|
2017-12-12 09:50:13 -08:00
|
|
|
Default is @Efl.Text.Font.Weight.normal\.
|
2017-05-22 07:36:41 -07:00
|
|
|
]]
|
|
|
|
values {
|
2017-08-31 06:26:17 -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
|
|
|
|
|
2017-12-12 09:50:13 -08:00
|
|
|
Default is @Efl.Text.Font.Slant.normal\.
|
2017-05-22 07:36:41 -07:00
|
|
|
]]
|
|
|
|
values {
|
2017-08-31 06:26:17 -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
|
|
|
|
|
2017-12-12 09:50:13 -08:00
|
|
|
Default is @Efl.Text.Font.Width.normal\.
|
2017-05-22 07:36:41 -07:00
|
|
|
]]
|
|
|
|
values {
|
2017-08-31 06:26:17 -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)
|
|
|
|
|
2017-12-12 09:50:13 -08:00
|
|
|
Default is @Efl.Text.Font.Bitmap_Scalable.none\.
|
2017-09-25 02:34:22 -07:00
|
|
|
]]
|
|
|
|
values {
|
|
|
|
scalable: Efl.Text.Font.Bitmap_Scalable; [[Scalable]]
|
|
|
|
}
|
|
|
|
}
|
2017-05-22 07:36:41 -07:00
|
|
|
}
|
|
|
|
}
|