Module: Fontconfig
- Defined in:
- lib/fontconfig.rb,
lib/fontconfig/version.rb,
ext/fontconfig/fontconfig.c
Defined Under Namespace
Classes: Config, FontSet, ObjectSet, Pattern
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Method Summary
collapse
Class Method Details
.current_config ⇒ Object
// FcConfigReference – Increment config reference count
78
79
80
81
82
83
84
|
# File 'ext/fontconfig/fc_config.c', line 78
static VALUE rb_config_get_current(VALUE klass){
FcConfig* conf = FcConfigGetCurrent();
if(!conf)
rb_raise(rb_eRuntimeError, "no current in FcConfigGetCurrent");
FcConfigReference(conf);
return config_wrap(conf);
}
|
.library_version ⇒ Object
6
7
8
9
|
# File 'ext/fontconfig/fontconfig.c', line 6
static VALUE rb_fc_version(VALUE self){
int version = FcGetVersion();
return INT2FIX(version);
}
|
.match(*args) ⇒ Object
81
82
83
84
85
86
87
88
|
# File 'lib/fontconfig.rb', line 81
def self.match *args
pat = if args.first.is_a? Pattern
args.first
else
self.prepared_pattern *args
end
current_config.font_match pat
end
|
.pattern(*args) ⇒ Object
73
74
75
|
# File 'lib/fontconfig.rb', line 73
def self.pattern *args
Pattern.new *args
end
|
.prepared_pattern(*args) ⇒ Object
77
78
79
|
# File 'lib/fontconfig.rb', line 77
def self.prepared_pattern *args
self.pattern(*args).prepare!
end
|