fortplot_unicode Module


Functions

public function codepoint_to_lowercase_greek(codepoint, ascii_equiv)

Convert lowercase Greek codepoint to ASCII name

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: codepoint
character(len=*), intent(out) :: ascii_equiv

Return Value logical

public function codepoint_to_uppercase_greek(codepoint, ascii_equiv)

Convert uppercase Greek codepoint to ASCII name

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: codepoint
character(len=*), intent(out) :: ascii_equiv

Return Value logical

public function utf8_char_length(char)

Determine the number of bytes in a UTF-8 character

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: char

Return Value integer

public function utf8_to_codepoint(text, start_pos)

Convert UTF-8 sequence to Unicode codepoint

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text
integer, intent(in) :: start_pos

Return Value integer

public function contains_unicode(text)

Check if text contains Unicode characters

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text

Return Value logical

public function is_unicode_char(char)

Check if a character is Unicode (multi-byte)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: char

Return Value logical

public function is_greek_letter_codepoint(codepoint)

Check if codepoint is a Greek letter

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: codepoint

Return Value logical


Subroutines

public subroutine escape_unicode_for_raster(input_text, escaped_text)

Pass through Unicode for raster rendering (STB TrueType supports Unicode)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: input_text
character(len=*), intent(out) :: escaped_text

public subroutine unicode_codepoint_to_ascii(codepoint, ascii_equiv)

Convert Unicode codepoint to ASCII equivalent

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: codepoint
character(len=*), intent(out) :: ascii_equiv

public subroutine codepoint_to_default_placeholder(codepoint, ascii_equiv)

Convert unknown codepoint to default placeholder format

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: codepoint
character(len=*), intent(out) :: ascii_equiv

public subroutine check_utf8_sequence(text, start_pos, is_valid, seq_len)

Check if UTF-8 sequence is valid and return its length

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text
integer, intent(in) :: start_pos
logical, intent(out) :: is_valid
integer, intent(out) :: seq_len