aboutsummaryrefslogtreecommitdiff
path: root/src/win/graph
diff options
context:
space:
mode:
Diffstat (limited to 'src/win/graph')
-rw-r--r--src/win/graph/direct/font.cpp2
-rw-r--r--src/win/graph/direct/text_layout.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/win/graph/direct/font.cpp b/src/win/graph/direct/font.cpp
index 8e881f84..6bd43078 100644
--- a/src/win/graph/direct/font.cpp
+++ b/src/win/graph/direct/font.cpp
@@ -29,4 +29,6 @@ DWriteFont::DWriteFont(DirectGraphFactory* factory,
ThrowIfFailed(
text_format_->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_CENTER));
}
+
+float DWriteFont::GetFontSize() { return text_format_->GetFontSize(); }
} // namespace cru::platform::graph::win::direct
diff --git a/src/win/graph/direct/text_layout.cpp b/src/win/graph/direct/text_layout.cpp
index ecee1727..59101163 100644
--- a/src/win/graph/direct/text_layout.cpp
+++ b/src/win/graph/direct/text_layout.cpp
@@ -1,5 +1,6 @@
#include "cru/win/graph/direct/text_layout.hpp"
+#include "cru/common/logger.hpp"
#include "cru/platform/check.hpp"
#include "cru/win/graph/direct/exception.hpp"
#include "cru/win/graph/direct/factory.hpp"
@@ -92,9 +93,8 @@ std::vector<Rect> DWriteTextLayout::TextRangeRect(const TextRange& text_range) {
result.reserve(actual_count);
for (const auto& metrics : hit_test_metrics) {
- result.push_back(Rect{metrics.left, metrics.top,
- metrics.left + metrics.width,
- metrics.top + metrics.height});
+ result.push_back(
+ Rect{metrics.left, metrics.top, metrics.width, metrics.height});
}
return result;