Documentation | InterfaceKit | unicode_block
SYNOPSIS
Perl
use HaikuR1::Font qw(be_plain_font B_CYRILLIC_BLOCK); my $blocks = be_plain_font->Blocks(); if ($blocks->Includes(B_CYRILLIC_BLOCK) { # do something }
Python
from HaikuR1.InterfaceKit import be_plain_font, B_CYRILLIC_BLOCK blocks = be_plain_font.Blocks() if blocks.Includes(B_CYRILLIC_BLOCK): # do something
DESCRIPTION
Exposes the unicode_block
object. Each bit of a unicode_block's internal
storage represents one
unicode block. Haiku currently
supports 71 unicode blocks, represented by the unicode_block constants below.
Font.Blocks returns a unicode_block with the bit set for each block it supports; by comparing the unicode_block returned by Font.Blocks to the constants below you can determine which unicode blocks a font supports.
> warning!
As of Unicode 9, there are 273 defined unicode blocks, so Haiku's support is not complete. In fact, Haiku doesn't completely cover all of unicode plane 0, and doesn't cover any of the other planes at all.
Additionally, Font.Blocks has not yet been implemented; the underlying C++
method is a stub that returns a unicode_block
with all bits set.
METHODS
Constructor
Builds a unicode_block object. (Generally you don't build your own; you get one by calling Font.Blocks or you use one of the constants.)
Perl
HaikuR1::unicode_block->new($block2, $block1);
Python
unicode_block(block2, block1)
block2
A 64-bit integer, the second set of bits.
block1
A 64-bit integer, the first set of bits.
copy
Copies the contents of another object into this object.
Perl
$unicode_block->copy($copy_from);
Python
unicode_block.copy(copy_from)
copy_from
A unicode_block to copy.
Includes
Returns true if the given block is a subset of this block.
Perl
$unicode_block->Includes($block);
Python
unicode_block.Includes(block)
block
The unicode_block to test.
OPERATORS
==
Returns true if the two blocks are equal.
!=
Returns true if the two blocks are not equal.
&
Returns the intersection of the two blocks.
|
Returns the union of the two blocks.
CONSTANTS
Perl
use HaikuR1::Font qw(:unicode_blocks)
Python
Python does not support export tags.
- B_BASIC_LATIN_BLOCK
- B_LATIN1_SUPPLEMENT_BLOCK
- B_LATIN_EXTENDED_A_BLOCK
- B_LATIN_EXTENDED_B_BLOCK
- B_IPA_EXTENSIONS_BLOCK
- B_SPACING_MODIFIER_LETTERS_BLOCK
- B_COMBINING_DIACRITICAL_MARKS_BLOCK
- B_BASIC_GREEK_BLOCK
- B_GREEK_SYMBOLS_AND_COPTIC_BLOCK
- B_CYRILLIC_BLOCK
- B_ARMENIAN_BLOCK
- B_BASIC_HEBREW_BLOCK
- B_HEBREW_EXTENDED_BLOCK
- B_BASIC_ARABIC_BLOCK
- B_ARABIC_EXTENDED_BLOCK
- B_DEVANAGARI_BLOCK
- B_BENGALI_BLOCK
- B_GURMUKHI_BLOCK
- B_GUJARATI_BLOCK
- B_ORIYA_BLOCK
- B_TAMIL_BLOCK
- B_TELUGU_BLOCK
- B_KANNADA_BLOCK
- B_MALAYALAM_BLOCK
- B_THAI_BLOCK
- B_LAO_BLOCK
- B_BASIC_GEORGIAN_BLOCK
- B_GEORGIAN_EXTENDED_BLOCK
- B_HANGUL_JAMO_BLOCK
- B_LATIN_EXTENDED_ADDITIONAL_BLOCK
- B_GREEK_EXTENDED_BLOCK
- B_GENERAL_PUNCTUATION_BLOCK
- B_SUPERSCRIPTS_AND_SUBSCRIPTS_BLOCK
- B_CURRENCY_SYMBOLS_BLOCK
- B_COMBINING_MARKS_FOR_SYMBOLS_BLOCK
- B_LETTERLIKE_SYMBOLS_BLOCK
- B_NUMBER_FORMS_BLOCK
- B_ARROWS_BLOCK
- B_MATHEMATICAL_OPERATORS_BLOCK
- B_MISCELLANEOUS_TECHNICAL_BLOCK
- B_CONTROL_PICTURES_BLOCK
- B_OPTICAL_CHARACTER_RECOGNITION_BLOCK
- B_ENCLOSED_ALPHANUMERICS_BLOCK
- B_BOX_DRAWING_BLOCK
- B_BLOCK_ELEMENTS_BLOCK
- B_GEOMETRIC_SHAPES_BLOCK
- B_MISCELLANEOUS_SYMBOLS_BLOCK
- B_DINGBATS_BLOCK
- B_CJK_SYMBOLS_AND_PUNCTUATION_BLOCK
- B_HIRAGANA_BLOCK
- B_KATAKANA_BLOCK
- B_BOPOMOFO_BLOCK
- B_HANGUL_COMPATIBILITY_JAMO_BLOCK
- B_CJK_MISCELLANEOUS_BLOCK
- B_ENCLOSED_CJK_LETTERS_AND_MONTHS_BLOCK
- B_CJK_COMPATIBILITY_BLOCK
- B_HANGUL_BLOCK
- B_HIGH_SURROGATES_BLOCK
- B_LOW_SURROGATES_BLOCK
- B_CJK_UNIFIED_IDEOGRAPHS_BLOCK
- B_PRIVATE_USE_AREA_BLOCK
- B_CJK_COMPATIBILITY_IDEOGRAPHS_BLOCK
- B_ALPHABETIC_PRESENTATION_FORMS_BLOCK
- B_ARABIC_PRESENTATION_FORMS_A_BLOCK
- B_COMBINING_HALF_MARKS_BLOCK
- B_CJK_COMPATIBILITY_FORMS_BLOCK
- B_SMALL_FORM_VARIANTS_BLOCK
- B_ARABIC_PRESENTATION_FORMS_B_BLOCK
- B_HALFWIDTH_AND_FULLWIDTH_FORMS_BLOCK
- B_SPECIALS_BLOCK
- B_TIBETAN_BLOCK