Compare commits

..
6 Commits
7 changed files with 132 additions and 19 deletions
-2
View File
@@ -32,5 +32,3 @@ m4/*.m4
/src/sysres/font_list
/src/sysres/license/dat_files/
/configure~
.cache
compile_commands.json
+15
View File
@@ -1,5 +1,7 @@
# Release Notes
- [Version 5.0.17](#version-5017)
+ [What's new in version 5.0.17](#whats-new-in-version-5017)
- [Version 5.0.16](#version-5016)
+ [What's new in version 5.0.16](#whats-new-in-version-5016)
- [Version 5.0.15](#version-5015)
@@ -36,6 +38,19 @@
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
+ [Deprecated APIs](#deprecated-apis)
## Version 5.0.17
On Feb. 07, 2026, FMSoft announces the availability of MiniGUI 5.0.17,
which is a bugfix release with some minor enhancements of MiniGUI 5.0.x.
* BUGFIXING:
- Fix legacy BIDI bracket reordering/mirroring for MBC Achar32.
- Fix wrong BIDI type mapping for ISO8859-6 0xEF.
- Fix a compilation error about bool type
- Fix Arabic letter 'ي' incorrectly using medial form at word start.
* OPTIMIZATION:
- Use drmModePageFlip for drmVideo to fix screen tearing.
## Version 5.0.16
On May 27, 2025, FMSoft announces the availability of MiniGUI 5.0.16,
+1 -1
View File
@@ -1,4 +1,4 @@
Version 5.0.16 (2025/05/27)
Version 5.0.17 (2026/02/07)
This is a minor enhancement and bugfix release of MiniGUI 5.0.x, the stable version.
+1 -1
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.71])
AC_INIT([libminigui],[5.0.16])
AC_INIT([libminigui],[5.0.17])
AC_CONFIG_SRCDIR(src/main/main.c)
AC_CONFIG_MACRO_DIRS([m4])
+2 -2
View File
@@ -166,7 +166,7 @@ static unsigned short iso8859_68x_unicode_map [] =
0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, /*0xF1~0xF4*/
0xFECB, 0xFECF, 0xFED3, 0xFED7, /*0xF5~0xF8*/
0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, /*0xF9~0xFC*/
0xFEEB, 0xFEF4, 0xFFFF, /*0xFD~0xFF*/
0xFEEB, 0xFEF3, 0xFFFF, /*0xFD~0xFF*/
0xFEC4, 0xFEC6, 0xFE82, 0xFE84, /*0x100~0x103*/
0xFE86, 0xFE88, 0xFE8C, 0xFE8E, /*0x104~0x107*/
@@ -576,7 +576,7 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_ON,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
/*0xf0~0xff*/
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
+110 -9
View File
@@ -286,7 +286,7 @@ static TYPERUN* get_runtype_link (const CHARSETOPS* charset_ops, Achar32* achars
last = list;
for (i = 0; i < len; i++){
if ((type = charset_ops->bidi_char_type (achars[i])) != last->type){
if ((type = charset_ops->bidi_char_type (REAL_ACHAR(achars[i]))) != last->type){
link = calloc(1, sizeof(TYPERUN));
link->type = type;
link->pos = i;
@@ -456,7 +456,7 @@ static void bidi_resolveWeak(TYPERUN **ptype_rl_list, Uint32 base_dir)
prev_type_org = TYPE(pp);
}
compact_neutrals (type_rl_list);
compact_list (type_rl_list);
#ifdef BIDI_DEBUG
print_run_types(type_rl_list);
@@ -469,19 +469,115 @@ static void bidi_resolveWeak(TYPERUN **ptype_rl_list, Uint32 base_dir)
#define BIDI_EMBEDDING_DIR(list) BIDI_LEVEL_TO_DIR(LEVEL(list))
/* 4.Resolving Neutral Types */
static void bidi_resolveNeutrals(TYPERUN **ptype_rl_list, Uint32 base_bir)
static void bidi_resolveNeutrals(const CHARSETOPS* charset_ops, Achar32* achars, int len,
TYPERUN **ptype_rl_list, Uint32 base_bir)
{
TYPERUN *type_rl_list = *ptype_rl_list, *pp = NULL;
Uint32* bracket_types = NULL;
int i;
if (charset_ops->bidi_mirror_char && achars && len > 0) {
typedef struct {
int pos;
Achar32 mirror;
} BRSTACK;
BRSTACK* stack = NULL;
int top = 0;
bracket_types = calloc(len, sizeof(Uint32));
stack = calloc(len, sizeof(BRSTACK));
if (bracket_types && stack) {
for (i = 0; i < len; i++) {
Achar32 ch = REAL_ACHAR(achars[i]);
Achar32 mirrored;
if (!charset_ops->bidi_mirror_char(ch, &mirrored))
continue;
if (ch < mirrored) {
stack[top].pos = i;
stack[top].mirror = mirrored;
top++;
}
else {
if (top > 0 && stack[top - 1].mirror == ch) {
int open_pos = stack[top - 1].pos;
int close_pos = i;
Uint32 found_dir = BIDI_TYPE_ON;
int k;
for (k = open_pos + 1; k < close_pos; k++) {
Uint32 t = charset_ops->bidi_char_type(REAL_ACHAR(achars[k]));
if (t == BIDI_TYPE_AL)
t = BIDI_TYPE_RTL;
if (BIDI_IS_LETTER(t)) {
found_dir = BIDI_IS_RTL(t) ? BIDI_TYPE_RTL : BIDI_TYPE_LTR;
break;
}
}
if (found_dir != BIDI_TYPE_ON) {
bracket_types[open_pos] = found_dir;
bracket_types[close_pos] = found_dir;
}
top--;
}
}
}
}
if (stack)
free(stack);
}
if (bracket_types) {
for (pp = type_rl_list->next; pp->next; pp = pp->next) {
if (BIDI_IS_NEUTRAL(TYPE(pp))) {
int start = POS(pp);
int end = start + LEN(pp);
Uint32 forced = BIDI_TYPE_ON;
if (end > len)
end = len;
for (i = start; i < end; i++) {
if (bracket_types[i] == BIDI_TYPE_RTL) {
forced = BIDI_TYPE_RTL;
break;
}
if (bracket_types[i] == BIDI_TYPE_LTR) {
forced = BIDI_TYPE_LTR;
}
}
if (forced != BIDI_TYPE_ON) {
TYPE(pp) = forced;
}
}
}
compact_list (type_rl_list);
}
DBGLOG ("\n4.Resolving neutral types\n");
for (pp = type_rl_list->next; pp->next; pp = pp->next)
{
Uint32 prev_type, this_type, next_type;
TYPERUN* prev = NULL;
TYPERUN* next = NULL;
prev = pp->prev;
while (prev && BIDI_IS_NEUTRAL(TYPE(prev)) && !BIDI_IS_SENTINEL(TYPE(prev)))
prev = prev->prev;
prev_type = (!prev || BIDI_IS_SENTINEL(TYPE(prev))) ? base_bir : TYPE(prev);
prev_type = TYPE(pp->prev);
this_type = TYPE(pp);
next_type = (pp->next) ? TYPE(pp->next) : this_type;
next = pp->next;
while (next && BIDI_IS_NEUTRAL(TYPE(next)) && !BIDI_IS_SENTINEL(TYPE(next)))
next = next->next;
next_type = (!next || BIDI_IS_SENTINEL(TYPE(next))) ? base_bir : TYPE(next);
/* "European and arabic numbers are treated as though they were R, NUMBER_TO_RTL does this. */
this_type = BIDI_NUMBER_TO_RTL(this_type);
prev_type = BIDI_NUMBER_TO_RTL(prev_type);
@@ -498,6 +594,9 @@ static void bidi_resolveNeutrals(TYPERUN **ptype_rl_list, Uint32 base_bir)
print_resolved_levels (type_rl_list);
print_resolved_types (type_rl_list);
#endif
if (bracket_types)
free(bracket_types);
}
/* 5.Resolving implicit levels. */
@@ -549,10 +648,13 @@ bidi_resolveMirrorChar (const CHARSETOPS* charset_ops, Achar32* achars, int len,
int i;
for (i = POS (pp); i < POS (pp) + LEN (pp); i++)
{
Achar32 ch = achars[i];
Achar32 real_ch = REAL_ACHAR(ch);
Achar32 mirrored_ch;
if (charset_ops->bidi_mirror_char &&
charset_ops->bidi_mirror_char (achars[i], &mirrored_ch))
achars[i] = mirrored_ch;
charset_ops->bidi_mirror_char (real_ch, &mirrored_ch)) {
achars[i] = IS_MBCHV(ch) ? SET_MBCHV(mirrored_ch) : mirrored_ch;
}
}
}
}
@@ -593,7 +695,7 @@ static void bidi_resolve_string (const CHARSETOPS* charset_ops,
bidi_resolveWeak(&type_rl_list, base_dir);
/* 4.Resolving Neutral Types */
bidi_resolveNeutrals(&type_rl_list, base_dir);
bidi_resolveNeutrals(charset_ops, achars, len, &type_rl_list, base_dir);
/* 5.Resolving implicit levels. */
*pmax_level = bidi_resolveImplicit(&type_rl_list, base_level);
@@ -826,4 +928,3 @@ Uint32 __mg_legacy_bidi_str_base_dir (const CHARSETOPS* charset_ops,
return base_dir;
}
+3 -4
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
*
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 2002~2026, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
*
* This program is free software: you can redistribute it and/or modify
@@ -57,6 +57,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "common.h"
#include "minigui.h"
@@ -215,8 +216,6 @@ static unsigned char emojiSegmentationCategory (Uchar32 codepoint)
}
typedef BOOL bool;
enum { false = FALSE, true = TRUE };
typedef unsigned char *emoji_text_iter_t;
#include "emoji_presentation_scanner.inc"
@@ -251,7 +250,7 @@ EmojiIterator * __mg_emoji_iterator_init (EmojiIterator *iter,
BOOL __mg_emoji_iterator_next (EmojiIterator *iter)
{
unsigned int old_cursor, cursor;
BOOL is_emoji;
bool is_emoji;
if (iter->end >= iter->text_end)
return FALSE;