Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: ui/gfx/win/text_analysis_source.cc

Issue 2054273002: Font fallback for UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/win/text_analysis_source.h ('k') | ui/gfx/win/text_analysis_source_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/dwrite_text_analysis_source_win.h" 5 #include "ui/gfx/win/text_analysis_source.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace gfx {
10 namespace win {
10 11
11 TextAnalysisSource::TextAnalysisSource() = default; 12 TextAnalysisSource::TextAnalysisSource() = default;
12 TextAnalysisSource::~TextAnalysisSource() = default; 13 TextAnalysisSource::~TextAnalysisSource() = default;
13 14
14 HRESULT TextAnalysisSource::GetLocaleName(UINT32 text_position, 15 HRESULT TextAnalysisSource::GetLocaleName(UINT32 text_position,
15 UINT32* text_length, 16 UINT32* text_length,
16 const WCHAR** locale_name) { 17 const WCHAR** locale_name) {
17 if (text_position >= text_.length() || !text_length || !locale_name) 18 if (text_position >= text_.length() || !text_length || !locale_name)
18 return E_INVALIDARG; 19 return E_INVALIDARG;
19 *text_length = text_.length() - text_position; 20 *text_length = text_.length() - text_position;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 IDWriteNumberSubstitution* number_substitution, 73 IDWriteNumberSubstitution* number_substitution,
73 DWRITE_READING_DIRECTION reading_direction) { 74 DWRITE_READING_DIRECTION reading_direction) {
74 DCHECK(number_substitution); 75 DCHECK(number_substitution);
75 text_ = text; 76 text_ = text;
76 locale_name_ = locale_name; 77 locale_name_ = locale_name;
77 number_substitution_ = number_substitution; 78 number_substitution_ = number_substitution;
78 reading_direction_ = reading_direction; 79 reading_direction_ = reading_direction;
79 return S_OK; 80 return S_OK;
80 } 81 }
81 82
82 } // namespace content 83 } // namespace win
84 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/win/text_analysis_source.h ('k') | ui/gfx/win/text_analysis_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698