From 098b00057d38eb9422e2e04d62823a0737bf71c4 Mon Sep 17 00:00:00 2001 From: ubuntu1804 Date: Mon, 10 Nov 2025 22:11:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=A7=BB=E5=88=B0docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check_text_rendering.sh | 141 ------------------ ARCHITECTURE.md => docs/ARCHITECTURE.md | 0 DEB_PACKAGE.md => docs/DEB_PACKAGE.md | 0 DELIVERY.md => docs/DELIVERY.md | 0 FINAL_SOLUTION.md => docs/FINAL_SOLUTION.md | 0 INDEX.md => docs/INDEX.md | 0 .../LIBRARY_PATH_NOTE.md | 0 PROBLEM_SOLVED.txt => docs/PROBLEM_SOLVED.txt | 0 .../PROJECT_OVERVIEW.md | 0 QUICKSTART.md => docs/QUICKSTART.md | 0 TEXT_RENDERING.md => docs/TEXT_RENDERING.md | 0 .../VULKAN_INTEGRATION.md | 0 .../VULKAN_WIDGET_SUMMARY.md | 0 13 files changed, 141 deletions(-) delete mode 100755 check_text_rendering.sh rename ARCHITECTURE.md => docs/ARCHITECTURE.md (100%) rename DEB_PACKAGE.md => docs/DEB_PACKAGE.md (100%) rename DELIVERY.md => docs/DELIVERY.md (100%) rename FINAL_SOLUTION.md => docs/FINAL_SOLUTION.md (100%) rename INDEX.md => docs/INDEX.md (100%) rename LIBRARY_PATH_NOTE.md => docs/LIBRARY_PATH_NOTE.md (100%) rename PROBLEM_SOLVED.txt => docs/PROBLEM_SOLVED.txt (100%) rename PROJECT_OVERVIEW.md => docs/PROJECT_OVERVIEW.md (100%) rename QUICKSTART.md => docs/QUICKSTART.md (100%) rename TEXT_RENDERING.md => docs/TEXT_RENDERING.md (100%) rename VULKAN_INTEGRATION.md => docs/VULKAN_INTEGRATION.md (100%) rename VULKAN_WIDGET_SUMMARY.md => docs/VULKAN_WIDGET_SUMMARY.md (100%) diff --git a/check_text_rendering.sh b/check_text_rendering.sh deleted file mode 100755 index 200c273..0000000 --- a/check_text_rendering.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash - -echo "========================================" -echo "Text Rendering Diagnostic Script" -echo "========================================" -echo "" - -# Check if FreeType is installed -echo "1. Checking FreeType installation..." -if pkg-config --exists freetype2; then - echo " ✓ FreeType found:" - pkg-config --modversion freetype2 - echo " Library: $(pkg-config --variable=libdir freetype2)/libfreetype.a" - echo " Include: $(pkg-config --cflags freetype2)" -else - echo " ✗ FreeType not found via pkg-config" -fi -echo "" - -# Check for font files -echo "2. Checking available fonts..." -FONTS=( - "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" - "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf" - "/usr/share/fonts/TTF/DejaVuSans.ttf" - "/usr/local/share/fonts/DejaVuSans.ttf" -) - -FOUND_FONT=false -for font in "${FONTS[@]}"; do - if [ -f "$font" ]; then - echo " ✓ Found: $font" - FOUND_FONT=true - fi -done - -if [ "$FOUND_FONT" = false ]; then - echo " ✗ No fonts found in standard locations" - echo " Installing DejaVu fonts might help:" - echo " sudo apt-get install fonts-dejavu-core" -fi -echo "" - -# Check if shaders are compiled -echo "3. Checking text shaders..." -if [ -f "src/shaders_spirv/text.vert.spv" ]; then - echo " ✓ text.vert.spv exists" -else - echo " ✗ text.vert.spv missing" -fi - -if [ -f "src/shaders_spirv/text.frag.spv" ]; then - echo " ✓ text.frag.spv exists" -else - echo " ✗ text.frag.spv missing" -fi - -if [ -f "src/shaders_spirv/text_vert.inc" ]; then - echo " ✓ text_vert.inc exists" -else - echo " ✗ text_vert.inc missing" -fi - -if [ -f "src/shaders_spirv/text_frag.inc" ]; then - echo " ✓ text_frag.inc exists" -else - echo " ✗ text_frag.inc missing" -fi -echo "" - -# Check build configuration -echo "4. Checking build configuration..." -if [ -f "build/CMakeCache.txt" ]; then - if grep -q "ENABLE_FREETYPE" build/CMakeCache.txt 2>/dev/null; then - echo " ✓ ENABLE_FREETYPE is defined" - else - echo " ✗ ENABLE_FREETYPE not found in build" - fi - - if grep -q "FREETYPE_LIBRARY" build/CMakeCache.txt 2>/dev/null; then - FREETYPE_LIB=$(grep "FREETYPE_LIBRARY" build/CMakeCache.txt | cut -d= -f2) - echo " ✓ FreeType library linked: $FREETYPE_LIB" - fi -else - echo " ⚠ Build directory not found - run ./build.sh first" -fi -echo "" - -# Check if executable exists and has FreeType symbols -echo "5. Checking executable..." -if [ -f "build/bin/ScreenLockDetector" ]; then - echo " ✓ Executable exists" - - # Check for FreeType symbols - if nm build/bin/ScreenLockDetector 2>/dev/null | grep -q "FT_Init_FreeType"; then - echo " ✓ FreeType symbols found in executable" - else - echo " ⚠ FreeType symbols not found (might be dynamically linked)" - fi - - # Check for Vulkan symbols - if nm build/bin/ScreenLockDetector 2>/dev/null | grep -q "vkCreateGraphicsPipeline"; then - echo " ✓ Vulkan symbols found" - fi -else - echo " ✗ Executable not found - build first with ./build.sh" -fi -echo "" - -# Run the application with text rendering debug output -echo "6. Testing text rendering (5 seconds)..." -echo " Starting application..." -if [ -f "build/bin/ScreenLockDetector" ]; then - timeout 5 ./run.sh 2>&1 | grep -E "Text|text|Font|font|FreeType|pipeline|charMap|Drawing text" | head -20 - echo "" - echo " If you see 'Drawing text with X vertices' above, text rendering is working!" -else - echo " ✗ Cannot test - executable not found" -fi -echo "" - -# Summary -echo "========================================" -echo "Summary" -echo "========================================" -echo "" -echo "Text rendering requires:" -echo " 1. FreeType library installed ✓" -echo " 2. At least one font file available" -echo " 3. Text shaders compiled (text.vert/frag.spv)" -echo " 4. ENABLE_FREETYPE defined in build" -echo " 5. Application successfully initializes text pipeline" -echo "" -echo "If text is not visible but pipeline is created:" -echo " - Check shader coordinate system" -echo " - Verify alpha blending is enabled" -echo " - Ensure text color contrasts with background" -echo " - Check if text is positioned within viewport" -echo "" -echo "For more details, see: TEXT_RENDERING.md" -echo "========================================" diff --git a/ARCHITECTURE.md b/docs/ARCHITECTURE.md similarity index 100% rename from ARCHITECTURE.md rename to docs/ARCHITECTURE.md diff --git a/DEB_PACKAGE.md b/docs/DEB_PACKAGE.md similarity index 100% rename from DEB_PACKAGE.md rename to docs/DEB_PACKAGE.md diff --git a/DELIVERY.md b/docs/DELIVERY.md similarity index 100% rename from DELIVERY.md rename to docs/DELIVERY.md diff --git a/FINAL_SOLUTION.md b/docs/FINAL_SOLUTION.md similarity index 100% rename from FINAL_SOLUTION.md rename to docs/FINAL_SOLUTION.md diff --git a/INDEX.md b/docs/INDEX.md similarity index 100% rename from INDEX.md rename to docs/INDEX.md diff --git a/LIBRARY_PATH_NOTE.md b/docs/LIBRARY_PATH_NOTE.md similarity index 100% rename from LIBRARY_PATH_NOTE.md rename to docs/LIBRARY_PATH_NOTE.md diff --git a/PROBLEM_SOLVED.txt b/docs/PROBLEM_SOLVED.txt similarity index 100% rename from PROBLEM_SOLVED.txt rename to docs/PROBLEM_SOLVED.txt diff --git a/PROJECT_OVERVIEW.md b/docs/PROJECT_OVERVIEW.md similarity index 100% rename from PROJECT_OVERVIEW.md rename to docs/PROJECT_OVERVIEW.md diff --git a/QUICKSTART.md b/docs/QUICKSTART.md similarity index 100% rename from QUICKSTART.md rename to docs/QUICKSTART.md diff --git a/TEXT_RENDERING.md b/docs/TEXT_RENDERING.md similarity index 100% rename from TEXT_RENDERING.md rename to docs/TEXT_RENDERING.md diff --git a/VULKAN_INTEGRATION.md b/docs/VULKAN_INTEGRATION.md similarity index 100% rename from VULKAN_INTEGRATION.md rename to docs/VULKAN_INTEGRATION.md diff --git a/VULKAN_WIDGET_SUMMARY.md b/docs/VULKAN_WIDGET_SUMMARY.md similarity index 100% rename from VULKAN_WIDGET_SUMMARY.md rename to docs/VULKAN_WIDGET_SUMMARY.md