[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] GSoC-2023-Ahmet 46551f7ef: -c 50 arg added
From: |
Werner Lemberg |
Subject: |
[freetype2] GSoC-2023-Ahmet 46551f7ef: -c 50 arg added |
Date: |
Mon, 19 Jun 2023 15:16:58 -0400 (EDT) |
branch: GSoC-2023-Ahmet
commit 46551f7ef8aecf39881c9e73d525a5dab5ff6542
Author: goksu <25721443+goeksu@users.noreply.github.com>
Commit: goksu <25721443+goeksu@users.noreply.github.com>
-c 50 arg added
---
builds/testing.mk | 7 ++++---
.../ftbench/fonts/{deactivated => }/Arial_subset.ttf | Bin
.../ftbench/fonts/{deactivated => }/Tahoma_subset.ttf | Bin
.../fonts/{deactivated => }/TimesNewRoman_subset.ttf | Bin
src/tools/ftbench/src/tohtml.py | 18 +++++++++++++-----
5 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/builds/testing.mk b/builds/testing.mk
index 4549e0181..e0fe0965e 100644
--- a/builds/testing.mk
+++ b/builds/testing.mk
@@ -2,6 +2,7 @@
FTBENCH_DIR = $(TOP_DIR)/src/tools/ftbench
FTBENCH_SRC = $(FTBENCH_DIR)/ftbench.c
FTBENCH_BIN = $(OBJ_DIR)/bench.o
+FTBENCH_FLAG = -c 50
FONTS = $(wildcard $(FTBENCH_DIR)/fonts/*.ttf)
BASELINE = $(addprefix $(FTBENCH_DIR)/baseline/, $(notdir $(FONTS:.ttf=.txt)))
BENCHMARK = $(addprefix $(FTBENCH_DIR)/benchmark/, $(notdir
$(FONTS:.ttf=.txt)))
@@ -25,7 +26,7 @@ $(FTBENCH_BIN): $(FTBENCH_SRC) | $(OBJ_DIR)
baseline: $(FTBENCH_BIN) $(BASELINE_DIR)
@echo "Creating baseline..."
@$(foreach font, $(FONTS), \
- $(FTBENCH_BIN) $(font) > $(BASELINE_DIR)$(notdir
$(font:.ttf=.txt)); \
+ $(FTBENCH_BIN) $(FTBENCH_FLAG) $(font) >
$(BASELINE_DIR)$(notdir $(font:.ttf=.txt)); \
)
@echo "Baseline created."
@@ -34,9 +35,9 @@ baseline: $(FTBENCH_BIN) $(BASELINE_DIR)
benchmark: $(FTBENCH_BIN) $(BENCHMARK_DIR)
@echo "Creating benchmark..."
@$(foreach font, $(FONTS), \
- $(FTBENCH_BIN) $(font) > $(BENCHMARK_DIR)$(notdir
$(font:.ttf=.txt)); \
+ $(FTBENCH_BIN) $(FTBENCH_FLAG) $(font) >
$(BENCHMARK_DIR)$(notdir $(font:.ttf=.txt)); \
)
- @$(PYTHON) $(HTMLCREATOR) > $(HTMLFILE)
+ @$(PYTHON) $(HTMLCREATOR)
@echo "Benchmark created."
.PHONY: clean-benchmark
diff --git a/src/tools/ftbench/fonts/deactivated/Arial_subset.ttf
b/src/tools/ftbench/fonts/Arial_subset.ttf
similarity index 100%
rename from src/tools/ftbench/fonts/deactivated/Arial_subset.ttf
rename to src/tools/ftbench/fonts/Arial_subset.ttf
diff --git a/src/tools/ftbench/fonts/deactivated/Tahoma_subset.ttf
b/src/tools/ftbench/fonts/Tahoma_subset.ttf
similarity index 100%
rename from src/tools/ftbench/fonts/deactivated/Tahoma_subset.ttf
rename to src/tools/ftbench/fonts/Tahoma_subset.ttf
diff --git a/src/tools/ftbench/fonts/deactivated/TimesNewRoman_subset.ttf
b/src/tools/ftbench/fonts/TimesNewRoman_subset.ttf
similarity index 100%
rename from src/tools/ftbench/fonts/deactivated/TimesNewRoman_subset.ttf
rename to src/tools/ftbench/fonts/TimesNewRoman_subset.ttf
diff --git a/src/tools/ftbench/src/tohtml.py b/src/tools/ftbench/src/tohtml.py
index 95b11f3d9..cd5c4ef51 100644
--- a/src/tools/ftbench/src/tohtml.py
+++ b/src/tools/ftbench/src/tohtml.py
@@ -2,7 +2,15 @@ import os
import re
# Create the HTML file
-with open('../../../../benchmark.html', 'w') as f:
+current_dir = os.path.dirname(os.path.abspath(__file__))
+
+# Get the project root directory (assuming the script is inside nested
directories in the project root)
+project_root = os.path.abspath(os.path.join(current_dir, '../../../../'))
+
+# Construct the absolute path to the benchmark file
+benchmark_file = os.path.join(project_root, 'benchmark.html')
+
+with open(benchmark_file, 'w') as f:
f.write('<html>\n')
f.write('<head>\n')
f.write('<title>Benchmark Results</title>\n')
@@ -10,10 +18,10 @@ with open('../../../../benchmark.html', 'w') as f:
f.write('<body>\n')
f.write('<h1>Benchmark Results</h1>\n')
- # Traverse through the 'baselines' directory
- for filename in os.listdir('../baseline'):
- baseline_filepath = os.path.join('../baseline', filename)
- benchmark_filepath = os.path.join('../benchmark', filename)
+ # Traverse through the 'baseline directory
+ for filename in os.listdir(os.path.join(project_root,
'src/tools/ftbench/baseline')):
+ baseline_filepath = os.path.join(os.path.join(project_root,
'src/tools/ftbench/baseline'), filename)
+ benchmark_filepath = os.path.join(os.path.join(project_root,
'src/tools/ftbench/benchmark'), filename)
# Process the baseline file
with open(baseline_filepath, 'r') as baseline_file:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] GSoC-2023-Ahmet 46551f7ef: -c 50 arg added,
Werner Lemberg <=