90 lines
2.6 KiB
PHP
90 lines
2.6 KiB
PHP
<?php
|
|
|
|
new WPCFTO_Gfonts();
|
|
|
|
class WPCFTO_Gfonts
|
|
{
|
|
public function __construct()
|
|
{
|
|
|
|
}
|
|
|
|
static function variants() {
|
|
return array(
|
|
"100" => __('Thin 100', 'wpcfto'),
|
|
"100italic" => __('Thin 100 italic', 'wpcfto'),
|
|
"300" => __('Light 300', 'wpcfto'),
|
|
"300italic" => __('Light 300 italic', 'wpcfto'),
|
|
"regular" => __('Regular 400', 'wpcfto'),
|
|
"italic" => __('Regular 400 italic', 'wpcfto'),
|
|
"500" => __('Medium 500', 'wpcfto'),
|
|
"500italic" => __('Medium 500 italic', 'wpcfto'),
|
|
"700" => __('Bold 700', 'wpcfto'),
|
|
"700italic" => __('Bold 700 italic', 'wpcfto'),
|
|
"900" => __('Black 900', 'wpcfto'),
|
|
"900italic" => __('Black 900 italic', 'wpcfto')
|
|
);
|
|
}
|
|
|
|
static function subsets() {
|
|
return array(
|
|
"cyrillic" => __('Cyrillic', 'wpcfto'),
|
|
"cyrillic-ext" => __('Cyrillic ext', 'wpcfto'),
|
|
"greek" => __('Greek', 'wpcfto'),
|
|
"greek-ext" => __('Greek ext', 'wpcfto'),
|
|
"latin" => __('Latin', 'wpcfto'),
|
|
"latin-ext" => __('Latin ext', 'wpcfto'),
|
|
"vietnamese" => __('Vietnamese', 'wpcfto')
|
|
);
|
|
}
|
|
|
|
static function align() {
|
|
return array(
|
|
"left" => __('Left', 'wpcfto'),
|
|
"center" => __('Center', 'wpcfto'),
|
|
"right" => __('Right', 'wpcfto'),
|
|
);
|
|
}
|
|
|
|
static function transform() {
|
|
return array(
|
|
"none" => __('Normal', 'wpcfto'),
|
|
"uppercase" => __('Uppercase', 'wpcfto'),
|
|
"lowercase" => __('Lowercase', 'wpcfto'),
|
|
"capitalize" => __('Capitalize', 'wpcfto'),
|
|
);
|
|
}
|
|
|
|
static function fonts_json()
|
|
{
|
|
return STM_WPCFTO_PATH . '/metaboxes/assets/webfonts/google-fonts.json';
|
|
}
|
|
|
|
static function google_fonts()
|
|
{
|
|
|
|
$g_fonts = json_decode(file_get_contents(self::fonts_json()), true);
|
|
|
|
return (
|
|
array(
|
|
'google' => $g_fonts['items'],
|
|
'websafe' => array(
|
|
'Arial',
|
|
'Arial Black',
|
|
'Verdana',
|
|
'Tahoma',
|
|
'Trebuchet MS',
|
|
'Impact',
|
|
'Times New Roman',
|
|
'Courier',
|
|
'Lucida Console',
|
|
'Monaco',
|
|
'Bradley Hand',
|
|
'Brush Script MT',
|
|
'Luminari',
|
|
'Comic Sans MS'
|
|
)
|
|
)
|
|
);
|
|
}
|
|
} |