just a slightly more robust default font handling... should now work on Haiku even if you didn't install fonts from BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12347 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8a92263232
commit
6697162d5c
@ -91,16 +91,18 @@
|
||||
|
||||
// These definitions provide the server something to use for default
|
||||
// system fonts.
|
||||
#define DEFAULT_PLAIN_FONT_FAMILY "Swis721 BT"
|
||||
#define DEFAULT_PLAIN_FONT_STYLE "Roman"
|
||||
#define DEFAULT_PLAIN_FONT_SIZE 12
|
||||
#define DEFAULT_BOLD_FONT_FAMILY "Swis721 BT"
|
||||
#define DEFAULT_BOLD_FONT_STYLE "Bold"
|
||||
#define DEFAULT_BOLD_FONT_SIZE 12
|
||||
#define DEFAULT_FIXED_FONT_FAMILY "Courier10 BT"
|
||||
#define DEFAULT_FIXED_FONT_STYLE "Roman"
|
||||
#define DEFAULT_FIXED_FONT_SIZE 12
|
||||
|
||||
# define DEFAULT_PLAIN_FONT_FAMILY "Bitstream Vera Sans"
|
||||
# define FALLBACK_PLAIN_FONT_FAMILY "Swis721 BT"
|
||||
# define DEFAULT_PLAIN_FONT_STYLE "Roman"
|
||||
# define DEFAULT_PLAIN_FONT_SIZE 12
|
||||
# define DEFAULT_BOLD_FONT_FAMILY "Bitstream Vera Sans"
|
||||
# define FALLBACK_BOLD_FONT_FAMILY "Swis721 BT"
|
||||
# define DEFAULT_BOLD_FONT_STYLE "Bold"
|
||||
# define DEFAULT_BOLD_FONT_SIZE 12
|
||||
# define DEFAULT_FIXED_FONT_FAMILY "Bitstream Vera Sans Mono"
|
||||
# define FALLBACK_FIXED_FONT_FAMILY "Courier10 BT"
|
||||
# define DEFAULT_FIXED_FONT_STYLE "Roman"
|
||||
# define DEFAULT_FIXED_FONT_SIZE 12
|
||||
// This is the port capacity for all monitoring objects - ServerApps
|
||||
// and ServerWindows
|
||||
#define DEFAULT_MONITOR_PORT_SIZE 30
|
||||
|
@ -113,15 +113,42 @@ AppServer::AppServer(void)
|
||||
// fontserver->ScanDirectory("/boot/home/config/fonts/psfonts/");
|
||||
fontserver->SaveList();
|
||||
|
||||
if(!fontserver->SetSystemPlain(DEFAULT_PLAIN_FONT_FAMILY,DEFAULT_PLAIN_FONT_STYLE,DEFAULT_PLAIN_FONT_SIZE))
|
||||
printf("Couldn't set plain to %s, %s %d pt\n",DEFAULT_PLAIN_FONT_FAMILY,
|
||||
DEFAULT_PLAIN_FONT_STYLE,DEFAULT_PLAIN_FONT_SIZE);
|
||||
if(!fontserver->SetSystemBold(DEFAULT_BOLD_FONT_FAMILY,DEFAULT_BOLD_FONT_STYLE,DEFAULT_BOLD_FONT_SIZE))
|
||||
printf("Couldn't set bold to %s, %s %d pt\n",DEFAULT_BOLD_FONT_FAMILY,
|
||||
DEFAULT_BOLD_FONT_STYLE,DEFAULT_BOLD_FONT_SIZE);
|
||||
if(!fontserver->SetSystemFixed(DEFAULT_FIXED_FONT_FAMILY,DEFAULT_FIXED_FONT_STYLE,DEFAULT_FIXED_FONT_SIZE))
|
||||
printf("Couldn't set fixed to %s, %s %d pt\n",DEFAULT_FIXED_FONT_FAMILY,
|
||||
DEFAULT_FIXED_FONT_STYLE,DEFAULT_FIXED_FONT_SIZE);
|
||||
if(!fontserver->SetSystemPlain(DEFAULT_PLAIN_FONT_FAMILY,
|
||||
DEFAULT_PLAIN_FONT_STYLE,
|
||||
DEFAULT_PLAIN_FONT_SIZE) ||
|
||||
!fontserver->SetSystemPlain(FALLBACK_PLAIN_FONT_FAMILY,
|
||||
DEFAULT_PLAIN_FONT_STYLE,
|
||||
DEFAULT_PLAIN_FONT_SIZE)) {
|
||||
printf("Couldn't set plain to %s, %s %d pt\n",
|
||||
DEFAULT_PLAIN_FONT_FAMILY,
|
||||
DEFAULT_PLAIN_FONT_STYLE,
|
||||
DEFAULT_PLAIN_FONT_SIZE);
|
||||
}
|
||||
|
||||
if(!fontserver->SetSystemBold(DEFAULT_BOLD_FONT_FAMILY,
|
||||
DEFAULT_BOLD_FONT_STYLE,
|
||||
DEFAULT_BOLD_FONT_SIZE) ||
|
||||
!fontserver->SetSystemBold(FALLBACK_BOLD_FONT_FAMILY,
|
||||
DEFAULT_BOLD_FONT_STYLE,
|
||||
DEFAULT_BOLD_FONT_SIZE)) {
|
||||
printf("Couldn't set bold to %s, %s %d pt\n",
|
||||
DEFAULT_BOLD_FONT_FAMILY,
|
||||
DEFAULT_BOLD_FONT_STYLE,
|
||||
DEFAULT_BOLD_FONT_SIZE);
|
||||
}
|
||||
|
||||
if(!fontserver->SetSystemFixed(DEFAULT_FIXED_FONT_FAMILY,
|
||||
DEFAULT_FIXED_FONT_STYLE,
|
||||
DEFAULT_FIXED_FONT_SIZE) ||
|
||||
!fontserver->SetSystemFixed(FALLBACK_FIXED_FONT_FAMILY,
|
||||
DEFAULT_FIXED_FONT_STYLE,
|
||||
DEFAULT_FIXED_FONT_SIZE)) {
|
||||
printf("Couldn't set fixed to %s, %s %d pt\n",
|
||||
DEFAULT_FIXED_FONT_FAMILY,
|
||||
DEFAULT_FIXED_FONT_STYLE,
|
||||
DEFAULT_FIXED_FONT_SIZE);
|
||||
}
|
||||
|
||||
fontserver->Unlock();
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user