2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
23 #include <sys/types.h>
32 #include <libxml/xmlmemory.h>
33 #include <libxml/parser.h>
40 #include <Ecore_Wayland.h>
43 #include <Elementary.h>
45 #include <system_settings.h>
46 #include <system_settings_private.h>
48 #define SMALL_FONT_DPI (-80)
49 #define MIDDLE_FONT_DPI (-100)
50 #define LARGE_FONT_DPI (-150)
51 #define HUGE_FONT_DPI (-190)
52 #define GIANT_FONT_DPI (-250)
54 #define SETTING_FONT_CONF_FILE "/opt/etc/fonts/conf.avail/99-slp.conf"
55 #define SETTING_STR_SLP_LEN 256
57 static char* _get_cur_font();
58 static void __font_size_set();
59 static int __font_size_get();
61 static void font_config_set(char *font_name);
62 static void font_config_set_notification();
65 * VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR has a path of the ringtone file which user choose
66 * @return the ringtone file path specified by user in normal case
67 * if it's not accessable, return the default ringtone path
69 int system_setting_get_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
72 if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, &vconf_value)) {
73 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
76 // check to see if it's accessable -> OK
77 // no --> default ringtone path VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR
78 int is_load = _is_file_accessible(vconf_value);
81 } else { // not zero on errro
82 //*value = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR);
83 //*value = strdup("ERROR");
84 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
87 //*value = vconf_value;
88 return SYSTEM_SETTINGS_ERROR_NONE;
92 int system_setting_get_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
95 if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, &vconf_value)) {
96 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
99 return SYSTEM_SETTINGS_ERROR_NONE;
103 int system_setting_get_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
106 if (system_setting_vconf_get_value_string(VCONFKEY_BGSET, &vconf_value)) {
107 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
109 *value = vconf_value;
110 return SYSTEM_SETTINGS_ERROR_NONE;
114 int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
118 if (system_setting_vconf_get_value_string(VCONFKEY_IDLE_LOCK_BGSET, &vconf_value)) {
119 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
121 *value = vconf_value;
123 return SYSTEM_SETTINGS_ERROR_NONE;
128 int system_setting_get_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
132 if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
133 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
135 *value = (void*)vconf_value;
137 return SYSTEM_SETTINGS_ERROR_NONE;
142 int system_setting_get_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
144 char* font_name = _get_cur_font();
145 *value = (void*)font_name;
147 return SYSTEM_SETTINGS_ERROR_NONE;
151 int system_setting_get_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
155 if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, &vconf_value)) {
156 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
158 *value = (void*)vconf_value;
160 return SYSTEM_SETTINGS_ERROR_NONE;
163 int system_setting_get_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
167 if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &vconf_value)) {
168 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
170 *value = (void*)vconf_value;
172 return SYSTEM_SETTINGS_ERROR_NONE;
175 int system_setting_get_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void** value)
179 if (system_setting_vconf_get_value_bool(VCONFKEY_3G_ENABLE, &vconf_value)) {
180 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
182 *value = (void*)vconf_value;
184 return SYSTEM_SETTINGS_ERROR_NONE;
186 ////////////////////////////////////////////////////////////////////////////////////////////////////
188 int system_setting_set_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
191 vconf_value = (char*)value;
193 int is_load = _is_file_accessible(vconf_value);
196 if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, vconf_value)) {
197 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
200 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
203 return SYSTEM_SETTINGS_ERROR_NONE;
207 int system_setting_set_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
210 vconf_value = (char*)value;
211 if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, vconf_value)) {
212 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
215 return SYSTEM_SETTINGS_ERROR_NONE;
219 int _is_file_accessible(const char * path)
221 int ret = access(path ,R_OK);
224 SETTING_TRACE("found the file %s", path);
233 int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
236 vconf_value = (char*)value;
238 // error handling here
239 if (_is_file_accessible(vconf_value) != 0)
240 return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
242 if (system_setting_vconf_set_value_string(VCONFKEY_BGSET, vconf_value)) {
243 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
246 return SYSTEM_SETTINGS_ERROR_NONE;
249 int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
252 vconf_value = (char*)value;
254 // error handling here
255 if (_is_file_accessible(vconf_value) != 0)
256 return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
258 if (system_setting_vconf_set_value_string(VCONFKEY_IDLE_LOCK_BGSET, vconf_value)) {
259 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
262 return SYSTEM_SETTINGS_ERROR_NONE;
265 int system_setting_set_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
269 vconf_value = (int*)value;
271 if (*vconf_value < 0 || *vconf_value > SYSTEM_SETTINGS_FONT_SIZE_GIANT) {
272 return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
275 if (system_setting_vconf_set_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, *vconf_value)) {
276 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
280 return SYSTEM_SETTINGS_ERROR_NONE;
285 void *font_conf_doc_parse(char *doc_name, char *font_name)
287 xmlDocPtr doc = NULL;
288 xmlNodePtr cur = NULL;
289 xmlNodePtr cur2 = NULL;
290 xmlNodePtr cur3 = NULL;
293 doc = xmlParseFile(doc_name);
295 cur = xmlDocGetRootElement(doc);
303 if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
309 cur = cur->xmlChildrenNode;
311 Eina_Bool is_changed = EINA_FALSE;
314 if((!xmlStrcmp(cur->name, (const xmlChar *)"match")))
316 cur2 = cur->xmlChildrenNode;
319 if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
321 xmlChar *name = xmlGetProp(cur2, (const xmlChar *)"name");
322 /* if name is not 'family', break */
323 if (xmlStrcmp(name, (const xmlChar *)"family"))
332 cur3 = cur2->xmlChildrenNode;
335 if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
337 xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
338 key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
341 is_changed = EINA_TRUE;
348 } else if ((!xmlStrcmp(cur->name, (const xmlChar *)"alias")))
350 cur2 = cur->xmlChildrenNode;
353 if ((!xmlStrcmp(cur2->name, (const xmlChar *)"family")))
355 xmlNodeSetContent(cur2->xmlChildrenNode, (const xmlChar *)font_name);
356 key = xmlNodeListGetString(doc, cur2->xmlChildrenNode, 1);
359 is_changed = EINA_TRUE;
360 } else if ((!xmlStrcmp(cur2->name, (const xmlChar *)"prefer")))
362 cur3 = cur2->xmlChildrenNode;
365 if((!xmlStrcmp(cur3->name, (const xmlChar *)"family")))
367 xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
368 key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
371 is_changed = EINA_TRUE;
373 break; /* just set first element, so break */
393 int system_setting_set_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
395 char* font_name = NULL;
396 font_name = (char*)value;
398 font_config_set(font_name);
399 font_config_set_notification();
402 vconf_value = (char*)value;
403 if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, vconf_value)) {
404 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
407 xmlDocPtr doc = (xmlDocPtr)font_conf_doc_parse(SETTING_FONT_CONF_FILE, font_name);
409 xmlSaveFormatFile(SETTING_FONT_CONF_FILE, doc, 0);
414 return SYSTEM_SETTINGS_ERROR_NONE;
417 int system_setting_set_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
420 vconf_value = (bool*)value;
421 if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, *vconf_value)) {
422 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
424 return SYSTEM_SETTINGS_ERROR_NONE;
427 int system_setting_set_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
430 vconf_value = (bool*)value;
431 if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, *vconf_value)) {
432 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
434 return SYSTEM_SETTINGS_ERROR_NONE;
438 int system_setting_set_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void* value)
441 vconf_value = (bool*)value;
442 if (system_setting_vconf_set_value_bool(VCONFKEY_3G_ENABLE, *vconf_value)) {
443 return SYSTEM_SETTINGS_ERROR_IO_ERROR;
445 return SYSTEM_SETTINGS_ERROR_NONE;
448 /////////////////////////////////////////////////////////////////////////////////////////////////
451 int system_setting_set_changed_callback_incoming_call_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
453 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, 0, user_data);
456 int system_setting_unset_changed_callback_incoming_call_ringtone(system_settings_key_e key)
458 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, 0);
461 int system_setting_set_changed_callback_email_alert_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
463 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, 0, user_data);
466 int system_setting_unset_changed_callback_email_alert_ringtone(system_settings_key_e key)
468 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, 0);
471 int system_setting_set_changed_callback_wallpaper_home_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
473 return system_setting_vconf_set_changed_cb(VCONFKEY_BGSET, SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, 0, user_data);
476 int system_setting_unset_changed_callback_wallpaper_home_screen(system_settings_key_e key)
478 return system_setting_vconf_unset_changed_cb(VCONFKEY_BGSET, 0);
481 int system_setting_set_changed_callback_wallpaper_lock_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
483 return system_setting_vconf_set_changed_cb(VCONFKEY_IDLE_LOCK_BGSET,SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, 0, user_data);
486 int system_setting_unset_changed_callback_wallpaper_lock_screen(system_settings_key_e key)
488 return system_setting_vconf_unset_changed_cb(VCONFKEY_IDLE_LOCK_BGSET, 0);
491 int system_setting_set_changed_callback_font_size(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
493 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE,SYSTEM_SETTINGS_KEY_FONT_SIZE, 1, user_data);
496 int system_setting_unset_changed_callback_font_size(system_settings_key_e key)
498 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, 1);
501 int system_setting_set_changed_callback_usb_debugging_option(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
503 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL,SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, 1, user_data);
506 int system_setting_unset_changed_callback_usb_debugging_option(system_settings_key_e key)
508 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, 1);
511 int system_setting_set_changed_callback_3g_data_network(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
513 return system_setting_vconf_set_changed_cb(VCONFKEY_3G_ENABLE,SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, 1,user_data);
516 int system_setting_unset_changed_callback_3g_data_network(system_settings_key_e key)
518 return system_setting_vconf_unset_changed_cb(VCONFKEY_3G_ENABLE, 1);
523 * @todo need to add custom event notification method
525 int system_setting_set_changed_callback_font_type(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
527 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME,SYSTEM_SETTINGS_KEY_FONT_TYPE, 2, user_data);
530 int system_setting_unset_changed_callback_font_type(system_settings_key_e key)
532 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME,2);
535 // TODO : 2th argument, callback, is not in use.
536 int system_setting_set_changed_callback_motion_activation(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
538 return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, 3, user_data );
541 int system_setting_unset_changed_callback_motion_activation(system_settings_key_e key)
543 return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, 3);
546 static char* _get_cur_font()
548 xmlDocPtr doc = NULL;
549 xmlNodePtr cur = NULL;
550 xmlNodePtr cur2 = NULL;
551 xmlNodePtr cur3 = NULL;
554 char *font_name = NULL;
556 doc = xmlParseFile(SETTING_FONT_CONF_FILE);
558 cur = xmlDocGetRootElement(doc);
566 if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
572 cur = cur->xmlChildrenNode;
576 if((!xmlStrcmp(cur->name, (const xmlChar *)"match")))
578 cur2 = cur->xmlChildrenNode;
581 if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
583 cur3 = cur2->xmlChildrenNode;
586 if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
588 key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
590 font_name = g_strdup((char *)key);
611 static void font_config_set_notification()
615 Ecore_X_Window ecore_xwin = ecore_x_window_root_first_get();
616 if (ecore_xwin != 0) {
617 Ecore_X_Atom atom = ecore_x_atom_get("FONT_TYPE_change");
618 ecore_x_window_prop_string_set(ecore_xwin, atom, "tizen");
623 //No font change notification on Wayland.(yet?)
630 static void font_config_set(char *font_name)
632 Eina_List *text_classes = NULL;
633 Elm_Text_Class *etc = NULL;
634 const Eina_List *l = NULL;
635 Eina_List *fo_list = NULL;
636 Elm_Font_Overlay *efo = NULL;
637 int font_size = __font_size_get();
640 text_classes = elm_config_text_classes_list_get();
642 fo_list = (Eina_List *)elm_config_font_overlay_list_get();
644 Eina_List *ll = NULL;
645 Eina_List *l_next = NULL;
647 Eina_Bool slp_medium_exist = EINA_FALSE;
648 Eina_Bool slp_roman_exist = EINA_FALSE;
649 Eina_Bool slp_bold_exist = EINA_FALSE;
650 Eina_Bool slp_regular_exist = EINA_FALSE;
653 Eina_Bool tizen_exist = EINA_FALSE;
655 EINA_LIST_FOREACH_SAFE(fo_list, ll, l_next, efo)
657 if (!strcmp(efo->text_class, "tizen_medium")) {
658 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
659 slp_medium_exist = EINA_TRUE;
660 } else if (!strcmp(efo->text_class, "tizen_roman")) {
661 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
662 slp_roman_exist = EINA_TRUE;
663 } else if (!strcmp(efo->text_class, "tizen_bold")) {
664 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
665 slp_bold_exist = EINA_TRUE;
666 } else if (!strcmp(efo->text_class, "tizen_regular")) {
667 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
668 slp_regular_exist = EINA_TRUE;
672 if (!strcmp(efo->text_class, "tizen")) {
673 elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size);
674 tizen_exist = EINA_TRUE;
679 /* if slp_XX do not exist, need to set them, font size is -100(100%) */
680 if (slp_medium_exist == EINA_FALSE) {
681 elm_config_font_overlay_set("tizen_medium", (const char*)font_name, MIDDLE_FONT_DPI);
683 if (slp_roman_exist == EINA_FALSE) {
684 elm_config_font_overlay_set("tizen_roman", (const char*)font_name, MIDDLE_FONT_DPI);
686 if (slp_bold_exist == EINA_FALSE) {
687 elm_config_font_overlay_set("tizen_bold", (const char*)font_name, MIDDLE_FONT_DPI);
689 if (slp_regular_exist == EINA_FALSE) {
690 elm_config_font_overlay_set("tizen_regular", (const char*)font_name, MIDDLE_FONT_DPI);
694 if (tizen_exist == EINA_FALSE) {
695 elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI);
698 elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI);
701 elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI);
703 EINA_LIST_FOREACH(text_classes, l, etc)
708 EINA_LIST_FOREACH(fo_list, ll, efo)
710 if (!strcmp(etc->name, efo->text_class)) {
714 elm_config_font_overlay_set(etc->name, (const char*)font_name, size);
717 elm_config_font_overlay_apply();
718 elm_config_all_flush();
719 // elm_config_engine_set("software_x11");
721 elm_config_text_classes_list_free(text_classes);
725 vconf_set_str(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, font_name);
728 static void __font_size_set()
730 Eina_List *text_classes = NULL;
731 Elm_Text_Class *etc = NULL;
732 const Eina_List *l = NULL;
733 int font_size = __font_size_get();
734 char *font_name = _get_cur_font();
736 if (font_size == -1) {
740 text_classes = elm_config_text_classes_list_get();
742 EINA_LIST_FOREACH(text_classes, l, etc)
744 elm_config_font_overlay_set(etc->name, font_name, font_size);
747 elm_config_font_overlay_apply();
748 elm_config_all_flush();
750 elm_config_text_classes_list_free(text_classes);
755 static int __font_size_get()
760 int vconf_value = -1;
761 if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
765 switch(vconf_value) {
766 case SYSTEM_SETTINGS_FONT_SIZE_SMALL:
767 font_size = SMALL_FONT_DPI;
769 case SYSTEM_SETTINGS_FONT_SIZE_NORMAL:
770 font_size = MIDDLE_FONT_DPI;
772 case SYSTEM_SETTINGS_FONT_SIZE_LARGE:
773 font_size = LARGE_FONT_DPI;
775 case SYSTEM_SETTINGS_FONT_SIZE_HUGE:
776 font_size = HUGE_FONT_DPI;
778 case SYSTEM_SETTINGS_FONT_SIZE_GIANT:
779 font_size = GIANT_FONT_DPI;
782 font_size = MIDDLE_FONT_DPI;