diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-16 21:32:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-16 21:32:26 +0000 |
commit | e80576173df7488964e588f5ac52f9af4b046021 (patch) | |
tree | 6eefe802d130f4ebeea7e6c6f66ee3b49379b92c /xfa/fde/cfde_texteditengine.cpp | |
parent | 027190ec8148a2f1edc18c37eae26e896f3a309a (diff) | |
download | pdfium-e80576173df7488964e588f5ac52f9af4b046021.tar.xz |
Clean up xfa/fde/cfde_textout.h.
- Move enums/structs other than CFDE_TextOut to a separate header.
- Move CFDE_TTOLine into CFDE_TextOut.
Change-Id: I63196ebe6c02bc88d1c20ecb625505013edbfa26
Reviewed-on: https://pdfium-review.googlesource.com/22930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_texteditengine.cpp')
-rw-r--r-- | xfa/fde/cfde_texteditengine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xfa/fde/cfde_texteditengine.cpp b/xfa/fde/cfde_texteditengine.cpp index 2bcd1fc9de..d085a8d147 100644 --- a/xfa/fde/cfde_texteditengine.cpp +++ b/xfa/fde/cfde_texteditengine.cpp @@ -11,6 +11,7 @@ #include "xfa/fde/cfde_textout.h" #include "xfa/fde/cfde_wordbreak_data.h" +#include "xfa/fgas/font/cfgas_gefont.h" namespace { @@ -632,6 +633,10 @@ void CFDE_TextEditEngine::SetFont(RetainPtr<CFGAS_GEFont> font) { is_dirty_ = true; } +RetainPtr<CFGAS_GEFont> CFDE_TextEditEngine::GetFont() const { + return font_; +} + void CFDE_TextEditEngine::SetFontSize(float size) { if (font_size_ == size) return; @@ -650,6 +655,10 @@ void CFDE_TextEditEngine::SetTabWidth(float width) { is_dirty_ = true; } +float CFDE_TextEditEngine::GetFontAscent() const { + return (static_cast<float>(font_->GetAscent()) * font_size_) / 1000; +} + void CFDE_TextEditEngine::SetAlignment(uint32_t alignment) { if (alignment == character_alignment_) return; |