From 8625d3b73eb51d2100cdf15e7a43b998b8251dc9 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 26 Jun 2018 15:12:48 +0000 Subject: Add FPDFTextObj_GetFontSize() API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In contrast with FPDFText_GetFontSize(), this exposes the font size of the text object according to the text state, rather than the font size of a particular character. Change-Id: Iac88d1aea8fb6bb5522bdaf01363aa6d32025b8f Reviewed-on: https://pdfium-review.googlesource.com/35931 Reviewed-by: Nicolás Peña Moreno Commit-Queue: Nicolás Peña Moreno --- fpdfsdk/fpdf_edit_embeddertest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fpdfsdk/fpdf_edit_embeddertest.cpp') diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index f2690499d1..9464417da1 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -1479,6 +1479,9 @@ TEST_F(FPDFEditEmbeddertest, AddStandardFontText) { EXPECT_EQ(200., matrix_e); EXPECT_EQ(200., matrix_f); + EXPECT_EQ(0, FPDFTextObj_GetFontSize(nullptr)); + EXPECT_EQ(20, FPDFTextObj_GetFontSize(text_object3)); + // TODO(npm): Why are there issues with text rotated by 90 degrees? // TODO(npm): FPDF_SaveAsCopy not giving the desired result after this. FPDF_ClosePage(page); -- cgit v1.2.3