diff --git a/entry/libs/x86_64/libTKBO.so.8.0 b/entry/libs/x86_64/libTKBO.so.8.0 index 6b9848e2..9f264bdb 100644 Binary files a/entry/libs/x86_64/libTKBO.so.8.0 and b/entry/libs/x86_64/libTKBO.so.8.0 differ diff --git a/entry/libs/x86_64/libTKBRep.so.8.0 b/entry/libs/x86_64/libTKBRep.so.8.0 index 79ffe200..2d1cff12 100644 Binary files a/entry/libs/x86_64/libTKBRep.so.8.0 and b/entry/libs/x86_64/libTKBRep.so.8.0 differ diff --git a/entry/libs/x86_64/libTKBin.so.8.0 b/entry/libs/x86_64/libTKBin.so.8.0 index fbb23d77..fff84092 100644 Binary files a/entry/libs/x86_64/libTKBin.so.8.0 and b/entry/libs/x86_64/libTKBin.so.8.0 differ diff --git a/entry/libs/x86_64/libTKBinL.so.8.0 b/entry/libs/x86_64/libTKBinL.so.8.0 index e3e0fc1d..c6166224 100644 Binary files a/entry/libs/x86_64/libTKBinL.so.8.0 and b/entry/libs/x86_64/libTKBinL.so.8.0 differ diff --git a/entry/libs/x86_64/libTKBinTObj.so.8.0 b/entry/libs/x86_64/libTKBinTObj.so.8.0 index b3b2a610..67728b23 100644 Binary files a/entry/libs/x86_64/libTKBinTObj.so.8.0 and b/entry/libs/x86_64/libTKBinTObj.so.8.0 differ diff --git a/entry/libs/x86_64/libTKBinXCAF.so.8.0 b/entry/libs/x86_64/libTKBinXCAF.so.8.0 index a051cffa..76a30ad3 100644 Binary files a/entry/libs/x86_64/libTKBinXCAF.so.8.0 and b/entry/libs/x86_64/libTKBinXCAF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKBool.so.8.0 b/entry/libs/x86_64/libTKBool.so.8.0 index fe8de421..34302ae0 100644 Binary files a/entry/libs/x86_64/libTKBool.so.8.0 and b/entry/libs/x86_64/libTKBool.so.8.0 differ diff --git a/entry/libs/x86_64/libTKCAF.so.8.0 b/entry/libs/x86_64/libTKCAF.so.8.0 index c0ef459c..09d747ee 100644 Binary files a/entry/libs/x86_64/libTKCAF.so.8.0 and b/entry/libs/x86_64/libTKCAF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKCDF.so.8.0 b/entry/libs/x86_64/libTKCDF.so.8.0 index 73fda0e4..0c73eb45 100644 Binary files a/entry/libs/x86_64/libTKCDF.so.8.0 and b/entry/libs/x86_64/libTKCDF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDE.so.8.0 b/entry/libs/x86_64/libTKDE.so.8.0 index 56226d12..37e599b1 100644 Binary files a/entry/libs/x86_64/libTKDE.so.8.0 and b/entry/libs/x86_64/libTKDE.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDECascade.so.8.0 b/entry/libs/x86_64/libTKDECascade.so.8.0 index 1be58ee6..17e99989 100644 Binary files a/entry/libs/x86_64/libTKDECascade.so.8.0 and b/entry/libs/x86_64/libTKDECascade.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDEIGES.so.8.0 b/entry/libs/x86_64/libTKDEIGES.so.8.0 index 5c58de76..277bf52a 100644 Binary files a/entry/libs/x86_64/libTKDEIGES.so.8.0 and b/entry/libs/x86_64/libTKDEIGES.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDEOBJ.so.8.0 b/entry/libs/x86_64/libTKDEOBJ.so.8.0 index 920e5b0a..cb3f9fc0 100644 Binary files a/entry/libs/x86_64/libTKDEOBJ.so.8.0 and b/entry/libs/x86_64/libTKDEOBJ.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDEPLY.so.8.0 b/entry/libs/x86_64/libTKDEPLY.so.8.0 index 7680afe6..fb9d91af 100644 Binary files a/entry/libs/x86_64/libTKDEPLY.so.8.0 and b/entry/libs/x86_64/libTKDEPLY.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDESTEP.so.8.0 b/entry/libs/x86_64/libTKDESTEP.so.8.0 index b4be147b..7f614e4c 100644 Binary files a/entry/libs/x86_64/libTKDESTEP.so.8.0 and b/entry/libs/x86_64/libTKDESTEP.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDESTL.so.8.0 b/entry/libs/x86_64/libTKDESTL.so.8.0 index a7fe5048..586e49ae 100644 Binary files a/entry/libs/x86_64/libTKDESTL.so.8.0 and b/entry/libs/x86_64/libTKDESTL.so.8.0 differ diff --git a/entry/libs/x86_64/libTKDEVRML.so.8.0 b/entry/libs/x86_64/libTKDEVRML.so.8.0 index eff9ff7e..2e333c8a 100644 Binary files a/entry/libs/x86_64/libTKDEVRML.so.8.0 and b/entry/libs/x86_64/libTKDEVRML.so.8.0 differ diff --git a/entry/libs/x86_64/libTKExpress.so.8.0 b/entry/libs/x86_64/libTKExpress.so.8.0 index 7f1638b5..86d6080b 100644 Binary files a/entry/libs/x86_64/libTKExpress.so.8.0 and b/entry/libs/x86_64/libTKExpress.so.8.0 differ diff --git a/entry/libs/x86_64/libTKFeat.so.8.0 b/entry/libs/x86_64/libTKFeat.so.8.0 index 32cac005..0582f7ba 100644 Binary files a/entry/libs/x86_64/libTKFeat.so.8.0 and b/entry/libs/x86_64/libTKFeat.so.8.0 differ diff --git a/entry/libs/x86_64/libTKFillet.so.8.0 b/entry/libs/x86_64/libTKFillet.so.8.0 index dec9273e..b158d466 100644 Binary files a/entry/libs/x86_64/libTKFillet.so.8.0 and b/entry/libs/x86_64/libTKFillet.so.8.0 differ diff --git a/entry/libs/x86_64/libTKG2d.so.8.0 b/entry/libs/x86_64/libTKG2d.so.8.0 index 2f15e6a1..f0924711 100644 Binary files a/entry/libs/x86_64/libTKG2d.so.8.0 and b/entry/libs/x86_64/libTKG2d.so.8.0 differ diff --git a/entry/libs/x86_64/libTKG3d.so.8.0 b/entry/libs/x86_64/libTKG3d.so.8.0 index 313b3fd7..0553e321 100644 Binary files a/entry/libs/x86_64/libTKG3d.so.8.0 and b/entry/libs/x86_64/libTKG3d.so.8.0 differ diff --git a/entry/libs/x86_64/libTKGeomAlgo.so.8.0 b/entry/libs/x86_64/libTKGeomAlgo.so.8.0 index 71433aa5..62d1ffef 100644 Binary files a/entry/libs/x86_64/libTKGeomAlgo.so.8.0 and b/entry/libs/x86_64/libTKGeomAlgo.so.8.0 differ diff --git a/entry/libs/x86_64/libTKGeomBase.so.8.0 b/entry/libs/x86_64/libTKGeomBase.so.8.0 index 0a7386b8..c9d0bfa7 100644 Binary files a/entry/libs/x86_64/libTKGeomBase.so.8.0 and b/entry/libs/x86_64/libTKGeomBase.so.8.0 differ diff --git a/entry/libs/x86_64/libTKHLR.so.8.0 b/entry/libs/x86_64/libTKHLR.so.8.0 index 2c056b9b..6efd7b11 100644 Binary files a/entry/libs/x86_64/libTKHLR.so.8.0 and b/entry/libs/x86_64/libTKHLR.so.8.0 differ diff --git a/entry/libs/x86_64/libTKHelix.so.8.0 b/entry/libs/x86_64/libTKHelix.so.8.0 index b08bfc81..1264dea2 100644 Binary files a/entry/libs/x86_64/libTKHelix.so.8.0 and b/entry/libs/x86_64/libTKHelix.so.8.0 differ diff --git a/entry/libs/x86_64/libTKLCAF.so.8.0 b/entry/libs/x86_64/libTKLCAF.so.8.0 index 8b498323..495ea621 100644 Binary files a/entry/libs/x86_64/libTKLCAF.so.8.0 and b/entry/libs/x86_64/libTKLCAF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKMath.so.8.0 b/entry/libs/x86_64/libTKMath.so.8.0 index a89a00aa..80f5e5d5 100644 Binary files a/entry/libs/x86_64/libTKMath.so.8.0 and b/entry/libs/x86_64/libTKMath.so.8.0 differ diff --git a/entry/libs/x86_64/libTKMesh.so.8.0 b/entry/libs/x86_64/libTKMesh.so.8.0 index a72bae3c..31148275 100644 Binary files a/entry/libs/x86_64/libTKMesh.so.8.0 and b/entry/libs/x86_64/libTKMesh.so.8.0 differ diff --git a/entry/libs/x86_64/libTKMeshVS.so.8.0 b/entry/libs/x86_64/libTKMeshVS.so.8.0 index 6f85a050..ccb0c936 100644 Binary files a/entry/libs/x86_64/libTKMeshVS.so.8.0 and b/entry/libs/x86_64/libTKMeshVS.so.8.0 differ diff --git a/entry/libs/x86_64/libTKOffset.so.8.0 b/entry/libs/x86_64/libTKOffset.so.8.0 index 638af238..8259ab2b 100644 Binary files a/entry/libs/x86_64/libTKOffset.so.8.0 and b/entry/libs/x86_64/libTKOffset.so.8.0 differ diff --git a/entry/libs/x86_64/libTKOpenGles.so.8.0 b/entry/libs/x86_64/libTKOpenGles.so.8.0 index d410519b..3c0c179c 100644 Binary files a/entry/libs/x86_64/libTKOpenGles.so.8.0 and b/entry/libs/x86_64/libTKOpenGles.so.8.0 differ diff --git a/entry/libs/x86_64/libTKPrim.so.8.0 b/entry/libs/x86_64/libTKPrim.so.8.0 index 79b4716c..50487161 100644 Binary files a/entry/libs/x86_64/libTKPrim.so.8.0 and b/entry/libs/x86_64/libTKPrim.so.8.0 differ diff --git a/entry/libs/x86_64/libTKRWMesh.so.8.0 b/entry/libs/x86_64/libTKRWMesh.so.8.0 index 9125a0a0..09bfff59 100644 Binary files a/entry/libs/x86_64/libTKRWMesh.so.8.0 and b/entry/libs/x86_64/libTKRWMesh.so.8.0 differ diff --git a/entry/libs/x86_64/libTKService.so.8.0 b/entry/libs/x86_64/libTKService.so.8.0 index 4f5fb042..222d60d7 100644 Binary files a/entry/libs/x86_64/libTKService.so.8.0 and b/entry/libs/x86_64/libTKService.so.8.0 differ diff --git a/entry/libs/x86_64/libTKShHealing.so.8.0 b/entry/libs/x86_64/libTKShHealing.so.8.0 index b74890a8..548b2858 100644 Binary files a/entry/libs/x86_64/libTKShHealing.so.8.0 and b/entry/libs/x86_64/libTKShHealing.so.8.0 differ diff --git a/entry/libs/x86_64/libTKStd.so.8.0 b/entry/libs/x86_64/libTKStd.so.8.0 index 942ccdc7..d8b11694 100644 Binary files a/entry/libs/x86_64/libTKStd.so.8.0 and b/entry/libs/x86_64/libTKStd.so.8.0 differ diff --git a/entry/libs/x86_64/libTKStdL.so.8.0 b/entry/libs/x86_64/libTKStdL.so.8.0 index 0031f902..680a93e9 100644 Binary files a/entry/libs/x86_64/libTKStdL.so.8.0 and b/entry/libs/x86_64/libTKStdL.so.8.0 differ diff --git a/entry/libs/x86_64/libTKTObj.so.8.0 b/entry/libs/x86_64/libTKTObj.so.8.0 index 0f9e8aa5..81a69bd1 100644 Binary files a/entry/libs/x86_64/libTKTObj.so.8.0 and b/entry/libs/x86_64/libTKTObj.so.8.0 differ diff --git a/entry/libs/x86_64/libTKTopAlgo.so.8.0 b/entry/libs/x86_64/libTKTopAlgo.so.8.0 index d4e30aed..8e6ac50b 100644 Binary files a/entry/libs/x86_64/libTKTopAlgo.so.8.0 and b/entry/libs/x86_64/libTKTopAlgo.so.8.0 differ diff --git a/entry/libs/x86_64/libTKV3d.so.8.0 b/entry/libs/x86_64/libTKV3d.so.8.0 index 24222c27..3376e63f 100644 Binary files a/entry/libs/x86_64/libTKV3d.so.8.0 and b/entry/libs/x86_64/libTKV3d.so.8.0 differ diff --git a/entry/libs/x86_64/libTKVCAF.so.8.0 b/entry/libs/x86_64/libTKVCAF.so.8.0 index c93cd46c..248f94e3 100644 Binary files a/entry/libs/x86_64/libTKVCAF.so.8.0 and b/entry/libs/x86_64/libTKVCAF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXCAF.so.8.0 b/entry/libs/x86_64/libTKXCAF.so.8.0 index 3b6f6a1e..77ef09bf 100644 Binary files a/entry/libs/x86_64/libTKXCAF.so.8.0 and b/entry/libs/x86_64/libTKXCAF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXMesh.so.8.0 b/entry/libs/x86_64/libTKXMesh.so.8.0 index 19f619cc..d175394e 100644 Binary files a/entry/libs/x86_64/libTKXMesh.so.8.0 and b/entry/libs/x86_64/libTKXMesh.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXSBase.so.8.0 b/entry/libs/x86_64/libTKXSBase.so.8.0 index 2d3517d3..1bd47adf 100644 Binary files a/entry/libs/x86_64/libTKXSBase.so.8.0 and b/entry/libs/x86_64/libTKXSBase.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXml.so.8.0 b/entry/libs/x86_64/libTKXml.so.8.0 index 7c7f0b26..4e6c3c63 100644 Binary files a/entry/libs/x86_64/libTKXml.so.8.0 and b/entry/libs/x86_64/libTKXml.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXmlL.so.8.0 b/entry/libs/x86_64/libTKXmlL.so.8.0 index 1f6c173e..8b5cadf7 100644 Binary files a/entry/libs/x86_64/libTKXmlL.so.8.0 and b/entry/libs/x86_64/libTKXmlL.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXmlTObj.so.8.0 b/entry/libs/x86_64/libTKXmlTObj.so.8.0 index cf39996c..173d99b4 100644 Binary files a/entry/libs/x86_64/libTKXmlTObj.so.8.0 and b/entry/libs/x86_64/libTKXmlTObj.so.8.0 differ diff --git a/entry/libs/x86_64/libTKXmlXCAF.so.8.0 b/entry/libs/x86_64/libTKXmlXCAF.so.8.0 index a95b1f6e..9c64d25c 100644 Binary files a/entry/libs/x86_64/libTKXmlXCAF.so.8.0 and b/entry/libs/x86_64/libTKXmlXCAF.so.8.0 differ diff --git a/entry/libs/x86_64/libTKernel.so.8.0 b/entry/libs/x86_64/libTKernel.so.8.0 index 618af7ca..bd83daea 100644 Binary files a/entry/libs/x86_64/libTKernel.so.8.0 and b/entry/libs/x86_64/libTKernel.so.8.0 differ diff --git a/entry/libs/x86_64/libfreetype.so.6 b/entry/libs/x86_64/libfreetype.so.6 new file mode 100644 index 00000000..9a26ba1d Binary files /dev/null and b/entry/libs/x86_64/libfreetype.so.6 differ diff --git a/entry/src/main/cpp/CMakeLists.txt b/entry/src/main/cpp/CMakeLists.txt index 2e555609..319f7f66 100644 --- a/entry/src/main/cpp/CMakeLists.txt +++ b/entry/src/main/cpp/CMakeLists.txt @@ -22,9 +22,15 @@ set(OCCT_CORE_LIBS TKTopAlgo TKMesh TKService TKV3d TKXCAF TKCAF TKLCAF TKCDF TKFillet TKDESTEP TKShHealing TKHLR TKVCAF TKBO TKPrim TKBool TKDE TKXSBase ) + +set(OCCT_3RD_LIBS libfreetype.so.6) + foreach(LIB_NAME ${OCCT_CORE_LIBS}) list(APPEND OCCT_IMPORTED_LIBS ${OCCT_LIB_DIR}/lib${LIB_NAME}.so.${OCCT_VERSION}) endforeach() +foreach(LIB_NAME ${OCCT_3RD_LIBS}) + list(APPEND OCCT_IMPORTED_LIBS ${OCCT_LIB_DIR}/${LIB_NAME}) +endforeach() # 添加源文件 add_library(opencax SHARED diff --git a/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.cpp b/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.cpp index 0c587a15..27f67824 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.cpp +++ b/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.cpp @@ -5,6 +5,7 @@ // please include "napi/native_api.h". #include "Axis.h" +#include "Prs3d_DatumMode.hxx" #include "Quantity_NameOfColor.hxx" #ifndef NATIVE_TAG @@ -37,24 +38,32 @@ bool Axis::InitAxis(Handle(AIS_InteractiveContext) & context) { axiTrihedron->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetWidth(1.5); axiTrihedron->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetWidth(1.5); axiTrihedron->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetWidth(1.5); - axiTrihedron->SetDatumPartColor(Prs3d_DP_XArrow, Quantity_NOC_RED2); - axiTrihedron->SetDatumPartColor(Prs3d_DP_YArrow, Quantity_NOC_GREEN2); - axiTrihedron->SetDatumPartColor(Prs3d_DP_ZArrow, Quantity_NOC_BLUE2); - axiTrihedron->SetDatumPartColor(Prs3d_DP_XAxis, Quantity_NOC_RED2); - axiTrihedron->SetDatumPartColor(Prs3d_DP_YAxis, Quantity_NOC_GREEN2); - axiTrihedron->SetDatumPartColor(Prs3d_DP_ZAxis, Quantity_NOC_BLUE2); + axiTrihedron->SetDatumPartColor(Prs3d_DP_XArrow, Quantity_NOC_GRAY85); + axiTrihedron->SetDatumPartColor(Prs3d_DP_YArrow, Quantity_NOC_GRAY85); + axiTrihedron->SetDatumPartColor(Prs3d_DP_ZArrow, Quantity_NOC_GRAY85); + axiTrihedron->SetDatumPartColor(Prs3d_DP_XAxis, Quantity_NOC_GRAY85); + axiTrihedron->SetDatumPartColor(Prs3d_DP_YAxis, Quantity_NOC_GRAY85); + axiTrihedron->SetDatumPartColor(Prs3d_DP_ZAxis, Quantity_NOC_GRAY85); axiTrihedron->SetLabel(Prs3d_DP_XAxis, "X"); axiTrihedron->SetLabel(Prs3d_DP_YAxis, "Y"); axiTrihedron->SetLabel(Prs3d_DP_ZAxis, "Z"); axiTrihedron->SetSize(theSize); + textAspect = axiTrihedron->Attributes()->TextAspect(); + if(textAspect.IsNull()){ + textAspect=new Prs3d_TextAspect(); + //textAspect->SetFont("HarmonyOS Sans"); + textAspect->SetHeight(3000.0); + textAspect->SetColor(Quantity_NOC_GRAY85); + axiTrihedron->Attributes()->DatumAspect()->SetTextAspect(textAspect); + } axiTrihedron->SetTransformPersistence(new Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, anOrg)); axiTrihedron->Attributes()->SetZLayer(Graphic3d_ZLayerId_Topmost); - axiTrihedron->SetInfiniteState(true); + //axiTrihedron->SetInfiniteState(true); context->Display(axiTrihedron, true); HILOG_INFO(NATIVE_TAG, "InitLocalAxis Done"); return true; } catch (std::exception &e) { - HILOG_INFO(NATIVE_TAG, "InitLocalAxis Fail:%{public}d", e.what()); + HILOG_INFO(NATIVE_TAG, "InitLocalAxis Fail:%s", e.what()); return false; } } @@ -70,10 +79,10 @@ bool Axis::InitAxisCube(Handle(AIS_InteractiveContext) & context) { axiViewCube->SetBoxSideLabel(V3d_Zneg, "Bottom"); axiViewCube->SetDrawAxes(false); axiViewCube->SetSize(60, true); - axiViewCube->SetTransparency(0.3); + axiViewCube->SetTransparency(0.0); axiViewCube->SetFixedAnimationLoop(true); axiViewCube->SetTextColor(Quantity_Color(Quantity_NOC_BLUE1)); - axiViewCube->SetFontHeight(100); + axiViewCube->SetFontHeight(20); axiViewCube->SetMaterial(Graphic3d_MaterialAspect(Graphic3d_NOM_ALUMINIUM)); axiViewCube->SetTransformPersistence( new Graphic3d_TransformPers(Graphic3d_TMF_TriedronPers, Aspect_TOTP_RIGHT_UPPER, NCollection_Vec2(100, 100))); diff --git a/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.h b/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.h index 6193605b..733eab49 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.h +++ b/entry/src/main/cpp/NativeEGLOCCT/Axis/Axis.h @@ -12,6 +12,7 @@ #include #include #include + namespace NativeOpenCAX { class Axis { @@ -32,6 +33,7 @@ private: Handle(AIS_Trihedron) axiTrihedron; //定义三面体 Handle(AIS_ViewCube) axiViewCube; + Handle(Prs3d_TextAspect) textAspect; private: //旋转X轴 float rotationX=0.0f; diff --git a/entry/src/main/cpp/NativeEGLOCCT/NativeRender.cpp b/entry/src/main/cpp/NativeEGLOCCT/NativeRender.cpp index 75e70464..367c2e9c 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/NativeRender.cpp +++ b/entry/src/main/cpp/NativeEGLOCCT/NativeRender.cpp @@ -1,5 +1,6 @@ #include "NativeRender.h" #include "Aspect_TypeOfLine.hxx" +#include "Font_FontAspect.hxx" #include "STEPControl_Reader.hxx" #ifndef NATIVE_TAG @@ -14,6 +15,9 @@ NativeRender::NativeRender(int w, int h) ogd(new OpenGlGraphicDriver), ts(new TextStyle), vw(new View), vr(new Viewer), win(new Window) { width = w; height = h; + ftMgr=Font_FontMgr::GetInstance(); + ftMgr->SetPrintErrors(true); + ftMgr->SetTraceAliases(true); } NativeRender::~NativeRender() { shapes_.clear(); } @@ -36,16 +40,6 @@ bool NativeRender::init(EGLCore &_eglCore) { HILOG_ERROR(NATIVE_TAG, "Init Ctx Fail!"); return false; } - if (!mAxis->InitAxis(ctx->context)) { - HILOG_ERROR(NATIVE_TAG, "Init AXIS Fail!"); - return false; - } - - if (!mAxis->InitAxisCube(ctx->context)) { - HILOG_ERROR(NATIVE_TAG, "Init AXIS Cuba Fail!"); - return false; - } - if (!win->InitWindow(width, height)) { HILOG_ERROR(NATIVE_TAG, "Init Window Fail!"); return false; @@ -62,6 +56,15 @@ bool NativeRender::init(EGLCore &_eglCore) { HILOG_ERROR(NATIVE_TAG, "Init Camera Fail!"); return false; } + if (!mAxis->InitAxis(ctx->context)) { + HILOG_ERROR(NATIVE_TAG, "Init AXIS Fail!"); + return false; + } + + if (!mAxis->InitAxisCube(ctx->context)) { + HILOG_ERROR(NATIVE_TAG, "Init AXIS Cuba Fail!"); + return false; + } vw->ResetView(); return true; } @@ -152,8 +155,6 @@ bool NativeRender::loadModel(const std::string &filePath) { shapes_.push_back(aisShape); } } - // 调整相机到合适位置 - vw->view->FitAll(0.5, true); vw->view->ZFitAll(); vw->ResetView(); OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_PRINT_DOMAIN, "LoadModel", @@ -188,35 +189,86 @@ void NativeRender::setZoomLevel(float zoom) { } void NativeRender::setClearColor(float r, float g, float b, float a) { vw->SetClearColor(r, g, b, a); } void NativeRender::resetView() { vw->ResetView(); } -void NativeRender::SwitchView(std::string view) { +void NativeRender::SwitchView(std::string view) { + fontDev(); vw->SwitchView(view); - OH_Drawing_FontConfigInfoErrorCode fontConfigInfoErrorCode; // 用于接收错误代码 - OH_Drawing_FontConfigInfo* fontConfigInfo = OH_Drawing_GetSystemFontConfigInfo(&fontConfigInfoErrorCode); - if(fontConfigInfoErrorCode != SUCCESS_FONT_CONFIG_INFO) { - OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_DOMAIN, "PrintSysFontMetrics", "获取系统信息失败,错误代码为: %{public}d", fontConfigInfoErrorCode); - } - // 获取系统字体配置信息示例 -if (fontConfigInfo != nullptr) { - // 获取字体文件路径数量,打印日志 - size_t fontDirCount = fontConfigInfo->fontDirSize; - OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", "字体文件路径数量为: %{public}zu\n", fontDirCount); - // 遍历字体文件路径列表,打印日志 - for (size_t i = 0; i < fontDirCount; ++i) { - OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", "字体文件路径为: %{public}s\n", - fontConfigInfo->fontDirSet[i]); - } - // 获取通用字体集数量,打印日志 - size_t genericCount = fontConfigInfo->fontGenericInfoSize; - OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", "通用字体集数量为: %{public}zu\n", genericCount); - // 遍历获取每个通用字体集中的字体家族名(例如 HarmonyOS Sans),打印日志 - for (size_t i = 0; i < genericCount; ++i) { - OH_Drawing_FontGenericInfo &genericInfo = fontConfigInfo->fontGenericInfoSet[i]; - OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", - "获取第%{public}zu个通用字体集中的字体家族名为: %{public}s", i, genericInfo.familyName); - } -} } +// 字体测试 +void NativeRender::fontDev() { + //获取鸿蒙系统字体管理信息 +// OH_Drawing_FontConfigInfoErrorCode fontConfigInfoErrorCode; // 用于接收错误代码 +// OH_Drawing_FontConfigInfo *fontConfigInfo = OH_Drawing_GetSystemFontConfigInfo(&fontConfigInfoErrorCode); +// if (fontConfigInfoErrorCode != SUCCESS_FONT_CONFIG_INFO) { +// OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_DOMAIN, "PrintSysFontMetrics", "获取系统信息失败,错误代码为: %{public}d", +// fontConfigInfoErrorCode); +// } +// // 获取系统字体配置信息示例 +// if (fontConfigInfo != nullptr) { +// // 获取字体文件路径数量,打印日志 +// size_t fontDirCount = fontConfigInfo->fontDirSize; +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", "字体文件路径数量为: %{public}zu\n", +// fontDirCount); +// // 遍历字体文件路径列表,打印日志 +// for (size_t i = 0; i < fontDirCount; ++i) { +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", "字体文件路径为: %{public}s\n", +// fontConfigInfo->fontDirSet[i]); +// } +// // 获取通用字体集数量,打印日志 +// size_t genericCount = fontConfigInfo->fontGenericInfoSize; +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", "通用字体集数量为: %{public}zu\n", +// genericCount); +// // 遍历获取每个通用字体集中的字体家族名(例如 HarmonyOS Sans),打印日志 +// for (size_t i = 0; i < genericCount; ++i) { +// OH_Drawing_FontGenericInfo &genericInfo = fontConfigInfo->fontGenericInfoSet[i]; +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", +// "获取第%{public}zu个通用字体集中的字体家族名为: %{public}s", i, genericInfo.familyName); +// for(size_t i = 0; i < genericInfo.adjustInfoSize; ++i){ +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "PrintSysFontMetrics", +// "获取第%{public}zu个通用字体集中的字体别名: %{public}s", i, genericInfo.aliasInfoSet->familyName); +// } +// +// } +// +// } + //OCCT字体管理信息获取 +// auto mgr=Font_FontMgr::GetInstance(); +// Font_FontAspect aspect = Font_FA_Regular; +// // 查找sans别名,优先匹配HarmonyOS Sans +// Handle(Font_SystemFont) font = mgr->FindFont("HarmonyOS-Sans", aspect); +// if (!font.IsNull()) { +// // 打印实际匹配到的字体名,若为HarmonyOS Sans则生效 +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "OCCT","SO库匹配到的字体名:%{public}s",font->FontName().ToCString()); +// } +// mgr->InitFontDataBase(); +// Handle(Font_SystemFont) sysFont=new Font_SystemFont("HarmonyOS-Sans"); +// sysFont->SetFontPath(Font_FontAspect_Regular, "/system/fonts/"); +// bool err=mgr->RegisterFont(sysFont,false); +// if(err){ +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "OCCT","OCCT RegisterFont Done"); +// } +// NCollection_Sequence> theAliases; +// mgr->GetAllAliases(theAliases); +// for(auto ft:theAliases){ +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "OCCT","OCCT Aliases: %{public}s", ft->ToCString()); +// } +// Handle(Font_SystemFont)sFont = mgr->GetFont("HarmonyOS-Sans"); +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "OCCT","OCCT sysFont: %{public}s", sFont->FontName().ToCString()); +// //查找指定的字体 +// const TCollection_AsciiString theFontName='HarmonyOS-Sans'; +// Font_FontAspect theFontAspect; +// mgr->FindFont(theFontName, theFontAspect); +// OH_LOG_Print(LOG_APP, LOG_INFO, LOG_DOMAIN, "OCCT","OCCT Font_FontAspect: %{public}s", theFontAspect); - - + //字体示例 + Handle(AIS_TextLabel) aTextLabel = new AIS_TextLabel(); + aTextLabel->SetText(TCollection_ExtendedString(u8"共产主义接班人")); + Handle(Prs3d_TextAspect) textAspect = aTextLabel->Attributes()->TextAspect(); + textAspect->SetFont("HarmonyOS Sans"); + textAspect->SetHeight(10000.0); + textAspect->SetColor(Quantity_Color(Quantity_NOC_YELLOW)); + gp_Pnt position(0.0, 0.0, 0.0); // 例如,在原点 + aTextLabel->SetPosition(position); + ctx->context->Display(aTextLabel, Standard_True); + vw->ResetView(); +} } // namespace NativeOpenCAX \ No newline at end of file diff --git a/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h b/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h index f999a693..0be0e963 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h +++ b/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h @@ -28,6 +28,10 @@ #include #include +#include +#include +#include + namespace NativeOpenCAX { class NativeRender { @@ -45,6 +49,7 @@ public: void setZoomLevel(float zoom); void setTranslation(float x, float y); void setCameraRotationMode(bool state); + void fontDev(); //视图 void SwitchView(std::string); void SetFrontView(); @@ -68,7 +73,7 @@ private: View* vw; Viewer* vr; Window* win; - + Handle(Font_FontMgr) ftMgr ; std::vector shapes_; }; } // namespace NativeRender diff --git a/entry/src/main/cpp/NativeEGLOCCT/TextStyle/TextStyle.cpp b/entry/src/main/cpp/NativeEGLOCCT/TextStyle/TextStyle.cpp index fe3b194a..3a1a5fae 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/TextStyle/TextStyle.cpp +++ b/entry/src/main/cpp/NativeEGLOCCT/TextStyle/TextStyle.cpp @@ -19,7 +19,7 @@ TextStyle::~TextStyle() {} bool TextStyle::InitTextStyle() { try { text = new Prs3d_TextAspect(); - text->SetFont(Font_NOF_ASCII_MONO); + text->SetFont("HarmonyOS Sans"); text->SetHeight(12); text->Aspect()->SetColor(Quantity_NOC_GRAY95); text->Aspect()->SetColorSubTitle(Quantity_NOC_BLACK); diff --git a/entry/src/main/cpp/NativeEGLOCCT/View/View.cpp b/entry/src/main/cpp/NativeEGLOCCT/View/View.cpp index 03b895da..66a5ce91 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/View/View.cpp +++ b/entry/src/main/cpp/NativeEGLOCCT/View/View.cpp @@ -5,6 +5,8 @@ // please include "napi/native_api.h". #include "View.h" +#include "Quantity_NameOfColor.hxx" +#include "V3d_TypeOfAxe.hxx" #ifndef NATIVE_TAG #define NATIVE_TAG "VIEW" @@ -46,7 +48,15 @@ void View::SetViewOption() { view->Camera()->SetProjectionType(Graphic3d_Camera::Projection_Perspective); view->SetBackgroundColor(Quantity_NOC_GRAY90); //左下角默认坐标系 - view->TriedronDisplay(Aspect_TOTP_LEFT_LOWER, Quantity_NOC_ALICEBLUE, 0.3, V3d_ZBUFFER); + view->TriedronDisplay(Aspect_TOTP_LEFT_LOWER, Quantity_NOC_ANTIQUEWHITE, 0.3, V3d_ZBUFFER); + Handle(V3d_Trihedron) tri; + tri=view->Trihedron(false); + if(!tri.IsNull()){ + HILOG_INFO(NATIVE_TAG, "V3d_Trihedron X"); + tri->LabelAspect(V3d_X)->SetFont("HarmonyOS Sans"); + tri->LabelAspect(V3d_X)->SetHeight(20.0); + tri->LabelAspect(V3d_X)->SetColor(Quantity_Color(Quantity_NOC_YELLOW)); + } } void View::SetText(Handle(Prs3d_TextAspect) & text) { @@ -64,8 +74,7 @@ void View::SetClearColor(float r, float g, float b, float a) { } void View::MustBeResized() { view->MustBeResized(); } -void View::Redraw() { - view->ZFitAll(); +void View::Redraw() { view->Redraw(); } void View::ResetView() { diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 0ac2fa37..31a38af7 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -1,8 +1,9 @@ import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; -import { window,display,AppStorageV2} from '@kit.ArkUI'; -import {MainScreenDisplayInfo,MainWindowInfo,MainWindowStageInfo} from '../pages/AppStorageV2Class' +import { window, display, AppStorageV2 } from '@kit.ArkUI'; +import { MainScreenDisplayInfo, MainWindowInfo, MainWindowStageInfo } from '../pages/AppStorageV2Class' import { IBestInit } from "@ibestservices/ibest-ui-v2" + const DOMAIN = 0x0000; export default class EntryAbility extends UIAbility { @@ -25,23 +26,25 @@ export default class EntryAbility extends UIAbility { // Main window is created, set main page for this ability hilog.info(DOMAIN, 'Tag', '%{public}s', 'Ability onWindowStageCreate'); //Get DefaultDispplay width&&height&&id - const screenDisplayId:number=display.getDefaultDisplaySync().id; - const screenWidth:number=display.getDefaultDisplaySync().width; - const screenHeight:number=display.getDefaultDisplaySync().height; + const screenDisplayId: number = display.getDefaultDisplaySync().id; + const screenWidth: number = display.getDefaultDisplaySync().width; + const screenHeight: number = display.getDefaultDisplaySync().height; //Set Main Window Size - const mainWindowWidth: number = screenWidth-100; - const mainWindowHeight: number = screenHeight-200; + const mainWindowWidth: number = screenWidth - 100; + const mainWindowHeight: number = screenHeight - 200; console.error(`main window Width: mainWindowWidth, Height: mainWindowHeight`); //Init&&Save AppStorageV2 - const mainDisplayInfo = AppStorageV2.connect(MainScreenDisplayInfo, () => new MainScreenDisplayInfo())!; - const mainWinInfo=AppStorageV2.connect(MainWindowInfo, () => new MainWindowInfo())!; - const mainWinStage=AppStorageV2.connect(MainWindowStageInfo, () => new MainWindowStageInfo())!; - mainDisplayInfo.mainScreenDisplayId=screenDisplayId; - mainDisplayInfo.mainScreenWidth=screenWidth; - mainDisplayInfo.mainScreenHeight=screenHeight; - mainWinInfo.mainWindowWidth=mainWindowWidth; - mainWinInfo.mainWindowHeight=mainWindowHeight; - mainWinStage.ws=windowStage; + const mainDisplayInfo = + AppStorageV2.connect(MainScreenDisplayInfo, () => new MainScreenDisplayInfo())!; + const mainWinInfo = AppStorageV2.connect(MainWindowInfo, () => new MainWindowInfo())!; + const mainWinStage = + AppStorageV2.connect(MainWindowStageInfo, () => new MainWindowStageInfo())!; + mainDisplayInfo.mainScreenDisplayId = screenDisplayId; + mainDisplayInfo.mainScreenWidth = screenWidth; + mainDisplayInfo.mainScreenHeight = screenHeight; + mainWinInfo.mainWindowWidth = mainWindowWidth; + mainWinInfo.mainWindowHeight = mainWindowHeight; + mainWinStage.ws = windowStage; //Get Main Window windowStage.getMainWindow((err, data) => { @@ -49,9 +52,9 @@ export default class EntryAbility extends UIAbility { console.error(`Failed to obtain the main window. Code: ${err.code}, message: ${err.message}`); return; } - this.mainWindow=data; + this.mainWindow = data; //moveWindowTo - this.mainWindow.moveWindowTo(50,50) + this.mainWindow.moveWindowTo(50, 50) //resize mainWindow Size this.mainWindow.resize(mainWindowWidth, mainWindowHeight, (err) => { if (err.code) { @@ -64,9 +67,10 @@ export default class EntryAbility extends UIAbility { // windowSizeChangeListener to Change mainWindowWidth&&mainWindowHeight in AppStorage this.mainWindow.on('windowSizeChange', (ListenerData) => { // if Size Change save to AppStorage - mainWinInfo.mainWindowWidth=ListenerData.width; - mainWinInfo.mainWindowHeight=ListenerData.height; - console.info('Succeeded in enabling the listener for window size changes. Data:'+ListenerData.width,ListenerData.height); + mainWinInfo.mainWindowWidth = ListenerData.width; + mainWinInfo.mainWindowHeight = ListenerData.height; + console.info('Succeeded in enabling the listener for window size changes. Data:' + ListenerData.width, + ListenerData.height); }); }); diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 6a307e39..4e87a049 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -5,15 +5,76 @@ import { LeftSideTab } from './LeftSideLayout/LeftSideTab' import { ModelViewTab } from './modelViewTab' import { TitleColumnSub } from './TitleLayout/TitleColumnSub' import { mwInfo } from './AppStorageV2Class' +import fs from '@ohos.file.fs'; +import resourceManager from '@ohos.resourceManager'; +import fileIO from '@ohos.fileio'; const DOMAIN = 0x0000; +let Fonts: Array = [ + "HarmonyOS_Sans_Black.tff", + "HarmonyOS_Sans_Bold.tff", + "HarmonyOS_Sans_Light.tff", + "HarmonyOS_Sans_Medium.tff", + "HarmonyOS_Sans_Regular.tff", + "HarmonyOS_Sans_Semibold.tff", + "HarmonyOS_Sans_Thin.tff", +] + @Entry @ComponentV2 struct Index { @Local startX:number=0; @Local isDragging:boolean=false; @Provider('panelWidth') panelWidth:number=mwInfo.mainWindowWidth * 0.15; + + //列出资源管理器指定目录下的所有问题件 + async HilogToDirFile(dir: string){ + const context = getContext(this); + // 获取资源管理器 + const rm = context.resourceManager; + + // 列出 rawfile/fonts/ + const fontFiles: string[] = await rm.getRawFileList(dir); + console.info(dir+'目录下文件:', JSON.stringify(fontFiles)); + + if (fontFiles.length === 0) { + console.warn(dir +':目录为空'); + return; + } + } + //复制字体到沙盒指定目录 + //SandBoxFontDir:"/data/storage/el2/base/haps/entry/files/fonts" + async CopyFontToSandbox(fontFiles: Array) { + try { + const context = getContext(this); + let srcPath = context.resourceDir+'/fonts/'; + let destPath = context.filesDir + '/fonts/'; + // 判断文件夹是否存在 + if (!fs.accessSync(destPath)) { + fs.mkdirSync(destPath); + console.info('创建沙箱目录成功:', destPath); + } + console.info('srcPath:', srcPath); + console.info('destPath:', destPath); + fs.copyDirSync(srcPath, destPath, 0) + } catch (err) { + let msg = 'Unknown error'; + if (err instanceof Error) { + msg = err.message; + } else if (typeof err === 'string') { + msg = err; + } + console.error(`Copy failed: ${msg}`); + throw new Error(`Failed to copy ${fontFiles} to sandbox: ${msg}`); + } + } + //Copy Font File to Sandbox + aboutToAppear() { + this.HilogToDirFile('fonts/'); + this.CopyFontToSandbox(Fonts); + } + build() { //OpenCAX主界面整体布局,采用多行布局 Column({ space: 0 }) { diff --git a/entry/src/main/ets/pages/modelView.ets b/entry/src/main/ets/pages/modelView.ets index 5a571e72..deae0a66 100644 --- a/entry/src/main/ets/pages/modelView.ets +++ b/entry/src/main/ets/pages/modelView.ets @@ -6,6 +6,7 @@ import NativeOpenCAX from 'libopencax.so'; const DOMAIN = 0x0000; let modelPath: string = ''; + export function OCCTLoadModel(Command: undefined, Param:undefined) { try { NativeOpenCAX.loadModel(modelPath); @@ -22,38 +23,12 @@ export struct ModelView { @State currentStatus: string = 'init'; private nodeContent: NodeContent = new NodeContent(); - aboutToAppear() { - NativeOpenCAX.createNativeNode(this.nodeContent); - this.copyRawFileToSandbox(); - } - async copyRawFileToSandbox() { - try { const context = getContext(this); - modelPath = `${context.filesDir}/${this.modelName}`; - const arrayBuffer:Uint8Array = await context.resourceManager.getRawFileContent(this.modelName); - const buffer = arrayBuffer.buffer; - console.log('Raw file size:', arrayBuffer.byteLength); - if (fs.accessSync(modelPath)) { - fs.unlinkSync(modelPath); - } - const fd = fileIO.openSync(modelPath, fs.OpenMode.CREATE | fs.OpenMode.READ_WRITE,0o666); - const bytesWritten = fileIO.writeSync(fd, buffer); - console.log('Bytes written:', bytesWritten); - fileIO.closeSync(fd); - console.log('SanBox File:', arrayBuffer.byteLength); - console.log('WriteModelPath:', modelPath); - } catch (err) { - let msg = 'Unknown error'; - if (err instanceof Error) { - msg = err.message; - } else if (typeof err === 'string') { - msg = err; - } - console.error(`Copy failed: ${msg}`); - throw new Error(`Failed to copy ${this.modelName} to sandbox: ${msg}`); + modelPath = `${context.filesDir}/${this.modelName}` + NativeOpenCAX.createNativeNode(this.nodeContent); } -} + build() { Flex({ direction: FlexDirection.Column }) { Row(){ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Black.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Black.ttf new file mode 100644 index 00000000..e551ec32 Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Black.ttf differ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Bold.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Bold.ttf new file mode 100644 index 00000000..d4a5771d Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Bold.ttf differ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Light.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Light.ttf new file mode 100644 index 00000000..ca84eb11 Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Light.ttf differ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Medium.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Medium.ttf new file mode 100644 index 00000000..c71de848 Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Medium.ttf differ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Regular.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Regular.ttf new file mode 100644 index 00000000..830b2afa Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Regular.ttf differ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Semibold.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Semibold.ttf new file mode 100644 index 00000000..27551a39 Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Semibold.ttf differ diff --git a/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Thin.ttf b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Thin.ttf new file mode 100644 index 00000000..56c5ae59 Binary files /dev/null and b/entry/src/main/resources/rawfile/fonts/HarmonyOS_Sans_Thin.ttf differ