Implementation of BFont::Blocks

BFont::Blocks is now implemented in ServerFont, via a call through the
app_server.  It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.

A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.

Signed-off-by: Axel Dörfler <[email protected]>
This commit is contained in:
dsizzle
2017-05-08 22:17:53 +02:00
committed by Axel Dörfler
parent b17d5d1c48
commit 9b6b158b88
11 changed files with 425 additions and 10 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2015, Haiku.
* Copyright 2001-2016, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -143,6 +143,8 @@ enum {
AS_GET_HAS_GLYPHS,
AS_GET_GLYPH_SHAPES,
AS_GET_TRUNCATED_STRINGS,
AS_GET_UNICODE_BLOCKS,
AS_GET_HAS_UNICODE_BLOCK,
// Screen methods
AS_VALID_SCREEN_ID,