Patch by Andrej Spielmann (GSOC):
* Add a private BFont API that sets/gets the subpixel and hinting configuration of the app_server. Currently, the options are boolean, but may be changed to modes later. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* Jérôme Duval, [email protected]
|
||||
* Axel Dörfler, [email protected]
|
||||
* Stephan Aßmus <[email protected]>
|
||||
* Andrej Spielmann, <[email protected]>
|
||||
*/
|
||||
|
||||
|
||||
@@ -405,6 +406,59 @@ _get_system_default_font_(const char* which, font_family family,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_set_font_subpixel_antialiasing_(bool subpix)
|
||||
{
|
||||
BPrivate::AppServerLink link;
|
||||
|
||||
link.StartMessage(AS_SET_FONT_SUBPIXEL_ANTIALIASING);
|
||||
link.Attach<bool>(subpix);
|
||||
link.Flush();
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
_get_font_subpixel_antialiasing_(bool* subpix)
|
||||
{
|
||||
BPrivate::AppServerLink link;
|
||||
|
||||
link.StartMessage(AS_GET_FONT_SUBPIXEL_ANTIALIASING);
|
||||
int32 status = B_ERROR;
|
||||
if (link.FlushWithReply(status) != B_OK
|
||||
|| status < B_OK)
|
||||
return status;
|
||||
link.Read<bool>(subpix);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_set_hinting_(bool hinting)
|
||||
{
|
||||
BPrivate::AppServerLink link;
|
||||
|
||||
link.StartMessage(AS_SET_HINTING);
|
||||
link.Attach<bool>(hinting);
|
||||
link.Flush();
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
_get_hinting_(bool* hinting)
|
||||
{
|
||||
|
||||
BPrivate::AppServerLink link;
|
||||
|
||||
link.StartMessage(AS_GET_HINTING);
|
||||
int32 status = B_ERROR;
|
||||
if (link.FlushWithReply(status) != B_OK
|
||||
|| status < B_OK)
|
||||
return status;
|
||||
link.Read<bool>(hinting);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief Returns the number of installed font families
|
||||
\return The number of installed font families
|
||||
|
||||
Reference in New Issue
Block a user