1 /* 2 * Copyright 2005-2008, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 * Axel Dörfler, axeld@pinc-software.de 8 * Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk> 9 */ 10 11 12 #include "DesktopSettings.h" 13 #include "DesktopSettingsPrivate.h" 14 #include "Desktop.h" 15 #include "FontCache.h" 16 #include "FontCacheEntry.h" 17 #include "FontManager.h" 18 #include "GlobalSubpixelSettings.h" 19 #include "ServerConfig.h" 20 21 #include <DefaultColors.h> 22 #include <ServerReadOnlyMemory.h> 23 24 #include <Directory.h> 25 #include <File.h> 26 #include <FindDirectory.h> 27 #include <Path.h> 28 29 30 DesktopSettingsPrivate::DesktopSettingsPrivate(server_read_only_memory* shared) 31 : 32 fShared(*shared) 33 { 34 // if the on-disk settings are not complete, the defaults will be kept 35 _SetDefaults(); 36 _Load(); 37 } 38 39 40 DesktopSettingsPrivate::~DesktopSettingsPrivate() 41 { 42 } 43 44 45 void 46 DesktopSettingsPrivate::_SetDefaults() 47 { 48 fPlainFont = *gFontManager->DefaultPlainFont(); 49 fBoldFont = *gFontManager->DefaultBoldFont(); 50 fFixedFont = *gFontManager->DefaultFixedFont(); 51 52 fMouseMode = B_NORMAL_MOUSE; 53 fShowAllDraggers = true; 54 55 // init scrollbar info 56 fScrollBarInfo.proportional = true; 57 fScrollBarInfo.double_arrows = false; 58 fScrollBarInfo.knob = 1; 59 // look of the knob (R5: (0, 1, 2), 1 = default) 60 fScrollBarInfo.min_knob_size = 15; 61 62 // init menu info 63 strlcpy(fMenuInfo.f_family, fPlainFont.Family(), B_FONT_FAMILY_LENGTH); 64 strlcpy(fMenuInfo.f_style, fPlainFont.Style(), B_FONT_STYLE_LENGTH); 65 fMenuInfo.font_size = fPlainFont.Size(); 66 fMenuInfo.background_color.set_to(216, 216, 216); 67 68 fMenuInfo.separator = 0; 69 // look of the separator (R5: (0, 1, 2), default 0) 70 fMenuInfo.click_to_open = true; // always true 71 fMenuInfo.triggers_always_shown = false; 72 73 fWorkspacesCount = 4; 74 75 memcpy(fShared.colors, BPrivate::kDefaultColors, sizeof(rgb_color) * kNumColors); 76 77 gSubpixelAntialiasing = false; 78 gDefaultHintingMode = HINTING_MODE_ON; 79 gSubpixelAverageWeight = 120; 80 gSubpixelOrderingRGB = true; 81 } 82 83 84 status_t 85 DesktopSettingsPrivate::_GetPath(BPath& path) 86 { 87 status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path); 88 if (status < B_OK) 89 return status; 90 91 status = path.Append("system/app_server"); 92 if (status < B_OK) 93 return status; 94 95 return create_directory(path.Path(), 0755); 96 } 97 98 99 status_t 100 DesktopSettingsPrivate::_Load() 101 { 102 // TODO: add support for old app_server_settings file as well 103 104 BPath basePath; 105 status_t status = _GetPath(basePath); 106 if (status < B_OK) 107 return status; 108 109 // read workspaces settings 110 111 BPath path(basePath); 112 path.Append("workspaces"); 113 114 BFile file; 115 status = file.SetTo(path.Path(), B_READ_ONLY); 116 if (status == B_OK) { 117 BMessage settings; 118 status = settings.Unflatten(&file); 119 if (status == B_OK) { 120 int32 count; 121 if (settings.FindInt32("count", &count) == B_OK) { 122 fWorkspacesCount = count; 123 if (fWorkspacesCount < 1 || fWorkspacesCount > 32) 124 fWorkspacesCount = 4; 125 } 126 127 int32 i = 0; 128 while (i < kMaxWorkspaces 129 && settings.FindMessage("workspace", i, &fWorkspaceMessages[i]) == B_OK) { 130 i++; 131 } 132 } 133 } 134 135 // read font settings 136 137 path = basePath; 138 path.Append("fonts"); 139 140 status = file.SetTo(path.Path(), B_READ_ONLY); 141 if (status == B_OK) { 142 BMessage settings; 143 status = settings.Unflatten(&file); 144 if (status == B_OK && gFontManager->Lock()) { 145 const char* family; 146 const char* style; 147 float size; 148 int32 hinting; 149 if (settings.FindString("plain family", &family) == B_OK 150 && settings.FindString("plain style", &style) == B_OK 151 && settings.FindFloat("plain size", &size) == B_OK) { 152 FontStyle* fontStyle = gFontManager->GetStyle(family, style); 153 fPlainFont.SetStyle(fontStyle); 154 fPlainFont.SetSize(size); 155 } 156 if (settings.FindString("bold family", &family) == B_OK 157 && settings.FindString("bold style", &style) == B_OK 158 && settings.FindFloat("bold size", &size) == B_OK) { 159 FontStyle* fontStyle = gFontManager->GetStyle(family, style); 160 fBoldFont.SetStyle(fontStyle); 161 fBoldFont.SetSize(size); 162 } 163 if (settings.FindString("fixed family", &family) == B_OK 164 && settings.FindString("fixed style", &style) == B_OK 165 && settings.FindFloat("fixed size", &size) == B_OK) { 166 FontStyle* fontStyle = gFontManager->GetStyle(family, style); 167 if (fontStyle != NULL && fontStyle->IsFixedWidth()) 168 fFixedFont.SetStyle(fontStyle); 169 fFixedFont.SetSize(size); 170 } 171 if (settings.FindInt32("hinting", &hinting) == B_OK) { 172 gDefaultHintingMode = hinting; 173 } 174 gFontManager->Unlock(); 175 } 176 } 177 178 // read mouse settings 179 180 path = basePath; 181 path.Append("mouse"); 182 183 status = file.SetTo(path.Path(), B_READ_ONLY); 184 if (status == B_OK) { 185 BMessage settings; 186 status = settings.Unflatten(&file); 187 if (status == B_OK) { 188 int32 mode; 189 if (settings.FindInt32("mode", &mode) == B_OK) { 190 fMouseMode = (mode_mouse)mode; 191 } 192 } 193 } 194 195 // read appearance settings 196 197 path = basePath; 198 path.Append("appearance"); 199 200 status = file.SetTo(path.Path(), B_READ_ONLY); 201 if (status == B_OK) { 202 BMessage settings; 203 status = settings.Unflatten(&file); 204 if (status == B_OK) { 205 float fontSize; 206 if (settings.FindFloat("font size", &fontSize) == B_OK) 207 fMenuInfo.font_size = fontSize; 208 209 const char* fontFamily; 210 if (settings.FindString("font family", &fontFamily) == B_OK) 211 strlcpy(fMenuInfo.f_family, fontFamily, B_FONT_FAMILY_LENGTH); 212 213 const char* fontStyle; 214 if (settings.FindString("font style", &fontStyle) == B_OK) 215 strlcpy(fMenuInfo.f_style, fontStyle, B_FONT_STYLE_LENGTH); 216 217 rgb_color bgColor; 218 if (settings.FindInt32("bg color", (int32*)&bgColor) == B_OK) 219 fMenuInfo.background_color = bgColor; 220 221 int32 separator; 222 if (settings.FindInt32("separator", &separator) == B_OK) 223 fMenuInfo.separator = separator; 224 225 bool clickToOpen; 226 if (settings.FindBool("click to open", &clickToOpen) == B_OK) 227 fMenuInfo.click_to_open = clickToOpen; 228 229 bool triggersAlwaysShown; 230 if (settings.FindBool("triggers always shown", &triggersAlwaysShown) 231 == B_OK) { 232 fMenuInfo.triggers_always_shown = triggersAlwaysShown; 233 } 234 235 bool subpix; 236 if (settings.FindBool("subpixel antialiasing", &subpix) == B_OK) 237 gSubpixelAntialiasing = subpix; 238 239 int8 averageWeight; 240 if (settings.FindInt8("subpixel average weight", &averageWeight) 241 == B_OK) { 242 gSubpixelAverageWeight = averageWeight; 243 } 244 245 bool subpixelOrdering; 246 if (settings.FindBool("subpixel ordering", &subpixelOrdering) 247 == B_OK) { 248 gSubpixelOrderingRGB = subpixelOrdering; 249 } 250 251 for (int32 i = 0; i < kNumColors; i++) { 252 char colorName[12]; 253 snprintf(colorName, sizeof(colorName), "color%ld", 254 (int32)index_to_color_which(i)); 255 256 settings.FindInt32(colorName, (int32*)&fShared.colors[i]); 257 } 258 } 259 } 260 261 // read dragger settings 262 263 path = basePath; 264 path.Append("dragger"); 265 266 status = file.SetTo(path.Path(), B_READ_ONLY); 267 if (status == B_OK) { 268 BMessage settings; 269 status = settings.Unflatten(&file); 270 if (status == B_OK) { 271 if (settings.FindBool("show", &fShowAllDraggers) != B_OK) 272 fShowAllDraggers = true; 273 } 274 } 275 276 return B_OK; 277 } 278 279 280 status_t 281 DesktopSettingsPrivate::Save(uint32 mask) 282 { 283 BPath basePath; 284 status_t status = _GetPath(basePath); 285 if (status < B_OK) 286 return status; 287 288 if (mask & kWorkspacesSettings) { 289 BPath path(basePath); 290 if (path.Append("workspaces") == B_OK) { 291 BMessage settings('asws'); 292 settings.AddInt32("count", fWorkspacesCount); 293 294 for (int32 i = 0; i < kMaxWorkspaces; i++) { 295 settings.AddMessage("workspace", &fWorkspaceMessages[i]); 296 } 297 298 BFile file; 299 status = file.SetTo(path.Path(), B_CREATE_FILE | B_ERASE_FILE 300 | B_READ_WRITE); 301 if (status == B_OK) { 302 status = settings.Flatten(&file, NULL); 303 } 304 } 305 } 306 307 if (mask & kFontSettings) { 308 BPath path(basePath); 309 if (path.Append("fonts") == B_OK) { 310 BMessage settings('asfn'); 311 312 settings.AddString("plain family", fPlainFont.Family()); 313 settings.AddString("plain style", fPlainFont.Style()); 314 settings.AddFloat("plain size", fPlainFont.Size()); 315 316 settings.AddString("bold family", fBoldFont.Family()); 317 settings.AddString("bold style", fBoldFont.Style()); 318 settings.AddFloat("bold size", fBoldFont.Size()); 319 320 settings.AddString("fixed family", fFixedFont.Family()); 321 settings.AddString("fixed style", fFixedFont.Style()); 322 settings.AddFloat("fixed size", fFixedFont.Size()); 323 324 settings.AddInt32("hinting", gDefaultHintingMode); 325 326 BFile file; 327 status = file.SetTo(path.Path(), B_CREATE_FILE | B_ERASE_FILE 328 | B_READ_WRITE); 329 if (status == B_OK) { 330 status = settings.Flatten(&file, NULL); 331 } 332 } 333 } 334 335 if (mask & kMouseSettings) { 336 BPath path(basePath); 337 if (path.Append("mouse") == B_OK) { 338 BMessage settings('asms'); 339 settings.AddInt32("mode", (int32)fMouseMode); 340 341 BFile file; 342 status = file.SetTo(path.Path(), B_CREATE_FILE | B_ERASE_FILE 343 | B_READ_WRITE); 344 if (status == B_OK) { 345 status = settings.Flatten(&file, NULL); 346 } 347 } 348 } 349 350 if (mask & kDraggerSettings) { 351 BPath path(basePath); 352 if (path.Append("dragger") == B_OK) { 353 BMessage settings('asdg'); 354 settings.AddBool("show", fShowAllDraggers); 355 356 BFile file; 357 status = file.SetTo(path.Path(), B_CREATE_FILE | B_ERASE_FILE 358 | B_READ_WRITE); 359 if (status == B_OK) { 360 status = settings.Flatten(&file, NULL); 361 } 362 } 363 } 364 365 if (mask & kAppearanceSettings) { 366 BPath path(basePath); 367 if (path.Append("appearance") == B_OK) { 368 BMessage settings('aslk'); 369 settings.AddFloat("font size", fMenuInfo.font_size); 370 settings.AddString("font family", fMenuInfo.f_family); 371 settings.AddString("font style", fMenuInfo.f_style); 372 settings.AddInt32("bg color", 373 (const int32&)fMenuInfo.background_color); 374 settings.AddInt32("separator", fMenuInfo.separator); 375 settings.AddBool("click to open", fMenuInfo.click_to_open); 376 settings.AddBool("triggers always shown", 377 fMenuInfo.triggers_always_shown); 378 379 settings.AddBool("subpixel antialiasing", gSubpixelAntialiasing); 380 settings.AddInt8("subpixel average weight", gSubpixelAverageWeight); 381 settings.AddBool("subpixel ordering", gSubpixelOrderingRGB); 382 383 for (int32 i = 0; i < kNumColors; i++) { 384 char colorName[12]; 385 snprintf(colorName, sizeof(colorName), "color%ld", 386 (int32)index_to_color_which(i)); 387 settings.AddInt32(colorName, (const int32&)fShared.colors[i]); 388 } 389 390 BFile file; 391 status = file.SetTo(path.Path(), B_CREATE_FILE | B_ERASE_FILE 392 | B_READ_WRITE); 393 if (status == B_OK) { 394 status = settings.Flatten(&file, NULL); 395 } 396 } 397 } 398 399 return status; 400 } 401 402 403 void 404 DesktopSettingsPrivate::SetDefaultPlainFont(const ServerFont &font) 405 { 406 fPlainFont = font; 407 Save(kFontSettings); 408 } 409 410 411 const ServerFont & 412 DesktopSettingsPrivate::DefaultPlainFont() const 413 { 414 return fPlainFont; 415 } 416 417 418 void 419 DesktopSettingsPrivate::SetDefaultBoldFont(const ServerFont &font) 420 { 421 fBoldFont = font; 422 Save(kFontSettings); 423 } 424 425 426 const ServerFont & 427 DesktopSettingsPrivate::DefaultBoldFont() const 428 { 429 return fBoldFont; 430 } 431 432 433 void 434 DesktopSettingsPrivate::SetDefaultFixedFont(const ServerFont &font) 435 { 436 fFixedFont = font; 437 Save(kFontSettings); 438 } 439 440 441 const ServerFont & 442 DesktopSettingsPrivate::DefaultFixedFont() const 443 { 444 return fFixedFont; 445 } 446 447 448 void 449 DesktopSettingsPrivate::SetScrollBarInfo(const scroll_bar_info& info) 450 { 451 fScrollBarInfo = info; 452 Save(kAppearanceSettings); 453 } 454 455 456 const scroll_bar_info& 457 DesktopSettingsPrivate::ScrollBarInfo() const 458 { 459 return fScrollBarInfo; 460 } 461 462 463 void 464 DesktopSettingsPrivate::SetMenuInfo(const menu_info& info) 465 { 466 fMenuInfo = info; 467 // Also update the ui_color 468 SetUIColor(B_MENU_BACKGROUND_COLOR, info.background_color); 469 // SetUIColor already saves the settings 470 } 471 472 473 const menu_info& 474 DesktopSettingsPrivate::MenuInfo() const 475 { 476 return fMenuInfo; 477 } 478 479 480 void 481 DesktopSettingsPrivate::SetMouseMode(const mode_mouse mode) 482 { 483 fMouseMode = mode; 484 Save(kMouseSettings); 485 } 486 487 488 mode_mouse 489 DesktopSettingsPrivate::MouseMode() const 490 { 491 return fMouseMode; 492 } 493 494 495 bool 496 DesktopSettingsPrivate::FocusFollowsMouse() const 497 { 498 return MouseMode() != B_NORMAL_MOUSE; 499 } 500 501 502 void 503 DesktopSettingsPrivate::SetShowAllDraggers(bool show) 504 { 505 fShowAllDraggers = show; 506 Save(kDraggerSettings); 507 } 508 509 510 bool 511 DesktopSettingsPrivate::ShowAllDraggers() const 512 { 513 return fShowAllDraggers; 514 } 515 516 517 void 518 DesktopSettingsPrivate::SetWorkspacesCount(int32 number) 519 { 520 if (number < 1) 521 number = 1; 522 else if (number > kMaxWorkspaces) 523 number = kMaxWorkspaces; 524 525 fWorkspacesCount = number; 526 Save(kWorkspacesSettings); 527 } 528 529 530 int32 531 DesktopSettingsPrivate::WorkspacesCount() const 532 { 533 return fWorkspacesCount; 534 } 535 536 537 void 538 DesktopSettingsPrivate::SetWorkspacesMessage(int32 index, BMessage& message) 539 { 540 if (index < 0 || index > kMaxWorkspaces) 541 return; 542 543 fWorkspaceMessages[index] = message; 544 } 545 546 547 const BMessage* 548 DesktopSettingsPrivate::WorkspacesMessage(int32 index) const 549 { 550 if (index < 0 || index > kMaxWorkspaces) 551 return NULL; 552 553 return &fWorkspaceMessages[index]; 554 } 555 556 557 void 558 DesktopSettingsPrivate::SetUIColor(color_which which, const rgb_color color) 559 { 560 // 561 int32 index = color_which_to_index(which); 562 if (index < 0 || index >= kNumColors) 563 return; 564 fShared.colors[index] = color; 565 // TODO: deprecate the background_color member of the menu_info struct, 566 // otherwise we have to keep this duplication... 567 if (which == B_MENU_BACKGROUND_COLOR) 568 fMenuInfo.background_color = color; 569 Save(kAppearanceSettings); 570 } 571 572 573 rgb_color 574 DesktopSettingsPrivate::UIColor(color_which which) const 575 { 576 static const rgb_color invalidColor = {0, 0, 0, 0}; 577 int32 index = color_which_to_index(which); 578 if (index < 0 || index >= kNumColors) 579 return invalidColor; 580 return fShared.colors[index]; 581 } 582 583 584 void 585 DesktopSettingsPrivate::SetSubpixelAntialiasing(bool subpix) 586 { 587 gSubpixelAntialiasing = subpix; 588 Save(kAppearanceSettings); 589 } 590 591 592 bool 593 DesktopSettingsPrivate::SubpixelAntialiasing() const 594 { 595 return gSubpixelAntialiasing; 596 } 597 598 599 void 600 DesktopSettingsPrivate::SetHinting(uint8 hinting) 601 { 602 gDefaultHintingMode = hinting; 603 Save(kFontSettings); 604 } 605 606 607 uint8 608 DesktopSettingsPrivate::Hinting() const 609 { 610 return gDefaultHintingMode; 611 } 612 613 614 void 615 DesktopSettingsPrivate::SetSubpixelAverageWeight(uint8 averageWeight) 616 { 617 gSubpixelAverageWeight = averageWeight; 618 Save(kAppearanceSettings); 619 } 620 621 622 uint8 623 DesktopSettingsPrivate::SubpixelAverageWeight() const 624 { 625 return gSubpixelAverageWeight; 626 } 627 628 629 void 630 DesktopSettingsPrivate::SetSubpixelOrderingRegular(bool subpixelOrdering) 631 { 632 gSubpixelOrderingRGB = subpixelOrdering; 633 Save(kAppearanceSettings); 634 } 635 636 637 bool 638 DesktopSettingsPrivate::IsSubpixelOrderingRegular() const 639 { 640 return gSubpixelOrderingRGB; 641 } 642 643 // #pragma mark - read access 644 645 646 DesktopSettings::DesktopSettings(Desktop* desktop) 647 : 648 fSettings(desktop->fSettings) 649 { 650 #if DEBUG 651 if (!desktop->fWindowLock.IsWriteLocked() 652 && !desktop->fWindowLock.IsReadLocked()) 653 debugger("desktop not locked when trying to access settings"); 654 #endif 655 } 656 657 658 void 659 DesktopSettings::GetDefaultPlainFont(ServerFont &font) const 660 { 661 font = fSettings->DefaultPlainFont(); 662 } 663 664 665 void 666 DesktopSettings::GetDefaultBoldFont(ServerFont &font) const 667 { 668 font = fSettings->DefaultBoldFont(); 669 } 670 671 672 void 673 DesktopSettings::GetDefaultFixedFont(ServerFont &font) const 674 { 675 font = fSettings->DefaultFixedFont(); 676 } 677 678 679 void 680 DesktopSettings::GetScrollBarInfo(scroll_bar_info& info) const 681 { 682 info = fSettings->ScrollBarInfo(); 683 } 684 685 686 void 687 DesktopSettings::GetMenuInfo(menu_info& info) const 688 { 689 info = fSettings->MenuInfo(); 690 } 691 692 693 mode_mouse 694 DesktopSettings::MouseMode() const 695 { 696 return fSettings->MouseMode(); 697 } 698 699 700 bool 701 DesktopSettings::FocusFollowsMouse() const 702 { 703 return fSettings->FocusFollowsMouse(); 704 } 705 706 707 bool 708 DesktopSettings::ShowAllDraggers() const 709 { 710 return fSettings->ShowAllDraggers(); 711 } 712 713 714 int32 715 DesktopSettings::WorkspacesCount() const 716 { 717 return fSettings->WorkspacesCount(); 718 } 719 720 721 const BMessage* 722 DesktopSettings::WorkspacesMessage(int32 index) const 723 { 724 return fSettings->WorkspacesMessage(index); 725 } 726 727 728 rgb_color 729 DesktopSettings::UIColor(color_which which) const 730 { 731 return fSettings->UIColor(which); 732 } 733 734 735 bool 736 DesktopSettings::SubpixelAntialiasing() const 737 { 738 return fSettings->SubpixelAntialiasing(); 739 } 740 741 742 uint8 743 DesktopSettings::Hinting() const 744 { 745 return fSettings->Hinting(); 746 } 747 748 749 uint8 750 DesktopSettings::SubpixelAverageWeight() const 751 { 752 return fSettings->SubpixelAverageWeight(); 753 } 754 755 756 bool 757 DesktopSettings::IsSubpixelOrderingRegular() const 758 { 759 // True corresponds to RGB, false means BGR 760 return fSettings->IsSubpixelOrderingRegular(); 761 } 762 763 // #pragma mark - write access 764 765 766 LockedDesktopSettings::LockedDesktopSettings(Desktop* desktop) 767 : DesktopSettings(desktop), 768 fDesktop(desktop) 769 { 770 #if DEBUG 771 if (desktop->fWindowLock.IsReadLocked()) 772 debugger("desktop read locked when trying to change settings"); 773 #endif 774 775 fDesktop->LockAllWindows(); 776 } 777 778 779 LockedDesktopSettings::~LockedDesktopSettings() 780 { 781 fDesktop->UnlockAllWindows(); 782 } 783 784 785 void 786 LockedDesktopSettings::SetDefaultPlainFont(const ServerFont &font) 787 { 788 fSettings->SetDefaultPlainFont(font); 789 } 790 791 792 void 793 LockedDesktopSettings::SetDefaultBoldFont(const ServerFont &font) 794 { 795 fSettings->SetDefaultBoldFont(font); 796 fDesktop->BroadcastToAllWindows(AS_SYSTEM_FONT_CHANGED); 797 } 798 799 800 void 801 LockedDesktopSettings::SetDefaultFixedFont(const ServerFont &font) 802 { 803 fSettings->SetDefaultFixedFont(font); 804 } 805 806 807 void 808 LockedDesktopSettings::SetScrollBarInfo(const scroll_bar_info& info) 809 { 810 fSettings->SetScrollBarInfo(info); 811 } 812 813 814 void 815 LockedDesktopSettings::SetMenuInfo(const menu_info& info) 816 { 817 fSettings->SetMenuInfo(info); 818 } 819 820 821 void 822 LockedDesktopSettings::SetMouseMode(const mode_mouse mode) 823 { 824 fSettings->SetMouseMode(mode); 825 } 826 827 828 void 829 LockedDesktopSettings::SetShowAllDraggers(bool show) 830 { 831 fSettings->SetShowAllDraggers(show); 832 } 833 834 835 void 836 LockedDesktopSettings::SetUIColor(color_which which, const rgb_color color) 837 { 838 fSettings->SetUIColor(which, color); 839 } 840 841 842 void 843 LockedDesktopSettings::SetSubpixelAntialiasing(bool subpix) 844 { 845 fSettings->SetSubpixelAntialiasing(subpix); 846 } 847 848 849 void 850 LockedDesktopSettings::SetHinting(uint8 hinting) 851 { 852 fSettings->SetHinting(hinting); 853 } 854 855 856 void 857 LockedDesktopSettings::SetSubpixelAverageWeight(uint8 averageWeight) 858 { 859 fSettings->SetSubpixelAverageWeight(averageWeight); 860 } 861 862 void 863 LockedDesktopSettings::SetSubpixelOrderingRegular(bool subpixelOrdering) 864 { 865 fSettings->SetSubpixelOrderingRegular(subpixelOrdering); 866 } 867 868