From 6ceec366073cd10a28d31e0d41440edbe089e441 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 13 Nov 2025 12:19:17 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B34GAi=E5=AD=97=E4=BD=93?= =?utf8?q?=E5=8F=A0=E5=AD=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/aivoice/src/AiVoiceModel.cpp | 2 +- .../nativeui/aivoice/src/AiVoiceModel.cpp | 2 +- .../uikit/ui/frameworks/draw/draw_utils.cpp | 6 ++++++ .../third_party/freetype/src/base/ftsystem.c | 20 ------------------- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp index 7808dae06..0e44242c5 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp @@ -2218,7 +2218,7 @@ extern "C" void net4g_AI_init(void) { - ws_register_chat_filter_callback(ws_chat_filter_cb_wrapper); + // ws_register_chat_filter_callback(ws_chat_filter_cb_wrapper); ws_register_ai_question_callback(ble_set_ai_Question_str_); ws_register_ai_answer_callback(ble_set_ai_Answer_str_); } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp index 9d2f21d60..523f244c7 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp @@ -2247,7 +2247,7 @@ extern "C" void net4g_AI_init(void) { - ws_register_chat_filter_callback(ws_chat_filter_cb_wrapper); + // ws_register_chat_filter_callback(ws_chat_filter_cb_wrapper); ws_register_ai_question_callback(ble_set_ai_Question_str_); ws_register_ai_answer_callback(ble_set_ai_Answer_str_); } diff --git a/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_utils.cpp b/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_utils.cpp index 96df29315..09a995db3 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_utils.cpp +++ b/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_utils.cpp @@ -299,6 +299,12 @@ bool DrawUtils::DrawLetterVectorPath(BufferInfo& gfxDstBuffer, const LabelLetter int16_t posY = letterInfo.pos.y + head.ascender - path.top - letterInfo.offsetY; int16_t originY = letterInfo.pos.y + head.ascender - letterInfo.offsetY; + + + //再打印一下posX、path.left、adjustedLeft、offsetX,再看下呢 + if(path.left > 20) + printf("posX: %d path.left: %d offsetX: %d\n", posX, path.left, letterInfo.offsetX); + if (letterInfo.direct == TEXT_DIRECT_RTL) { originX = originX - path.advance; posX = posX - path.advance; diff --git a/code/sdk/open_source/openharmony/third_party/freetype/src/base/ftsystem.c b/code/sdk/open_source/openharmony/third_party/freetype/src/base/ftsystem.c index a250cde47..f92b3a03d 100644 --- a/code/sdk/open_source/openharmony/third_party/freetype/src/base/ftsystem.c +++ b/code/sdk/open_source/openharmony/third_party/freetype/src/base/ftsystem.c @@ -33,7 +33,6 @@ #include FT_ERRORS_H #include FT_TYPES_H -#include "graphic_hardware_config.h" /************************************************************************** * @@ -225,28 +224,9 @@ file = STREAM_FILE( stream ); - #if defined(BOARD_N9) || defined(BOARD_FD230) //减少4gai叠字概率,还未完全解决 - long oriFilePos = ftell(file); - if ( stream->pos != offset ) { // seek可能就走这里,偏移,读取count为0 - ft_fseek( file, (long)offset, SEEK_SET ); // LWJ: 位置错了,可以强制偏移,以入参为准 - // printf("[LTT] [%s: %d] seek: offset %d, stream->pos: %d\n", - // __FUNCTION__, __LINE__, offset, stream->pos); // todo: 可以放开,每次强制偏移保证位置正确,再去读数据 - } else { // 检测是否有可能记录的位置和实际File位置不一致的情况 - if (oriFilePos != offset) { - // printf("[LTT] [%s: %d] oriFilePos : %d, not equal to, offset: %d!!!!!!!!!\n", - // __FUNCTION__, __LINE__, oriFilePos, offset); - ft_fseek( file, (long)offset, SEEK_SET ); // LWJ: 位置错了,可以强制偏移,以入参为准 - } - } - if (count != 0) { - // printf("[LTT] [%s: %d] ft_ansi_stream_io READ: buffer %p, file->pos: %d, stream->pos: %d, offset: %d, count: %u\n", - // __FUNCTION__, __LINE__, buffer, ftell(file), stream->pos, offset, count); - } - #else if ( stream->pos != offset ) ft_fseek( file, (long)offset, SEEK_SET ); - #endif return (unsigned long)ft_fread( buffer, 1, count, file ); } -- 2.17.1