Add method to retrieve path and ttc index, refactor AddFontFiles
DirectWrite will only ever give us one file - we do not need an implementation for retrieving multiple files per IDWriteFont. In upcoming changes for unique local font matching for src: local(...) @font-face declarations, we need a way to retrieve the ttc index of a matched font. Taking those two aspects into account, refactor AddFontFiles to rely on a new method FontFilePathAndTtcIndex which retrieves path and ttc index for a IDWriteFont. Also move helper methods to anonymous namespace. No functional changes to the DWriteFontProxy mojo interface, which this DWriteFontProxyImpl implements. Implementation mostly moved and restructured, but mostly unchanged and taken from previous code. Bug: 889864 Change-Id: Ida13667533eb338bb62083026ddbb386b8dcf0b2 Reviewed-on: https://chromium-review.googlesource.com/c/1371884 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#615582}
Showing
Please register or sign in to comment