解决4GAi字体叠字问题 2735/1 2735/head
authorluozheng <1732036298@qq.com>
Thu, 13 Nov 2025 04:19:17 +0000 (12:19 +0800)
committerluozheng <1732036298@qq.com>
Thu, 13 Nov 2025 04:19:17 +0000 (12:19 +0800)
code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_utils.cpp
code/sdk/open_source/openharmony/third_party/freetype/src/base/ftsystem.c

index 7808dae..0e44242 100644 (file)
@@ -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_);
     }
index 9d2f21d..523f244 100644 (file)
@@ -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_);
     }
index 96df293..09a995d 100644 (file)
@@ -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;
index a250cde..f92b3a0 100644 (file)
@@ -33,7 +33,6 @@
 #include FT_ERRORS_H
 #include FT_TYPES_H
 
-#include "graphic_hardware_config.h"
 
   /**************************************************************************
    *
 
     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 );
   }