| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 #ifdef SK_BUILD_FOR_MAC | 10 #ifdef SK_BUILD_FOR_MAC |
| (...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 entry->offset = SkEndian_SwapBE32(dataPtr - dataStart); | 1674 entry->offset = SkEndian_SwapBE32(dataPtr - dataStart); |
| 1675 entry->logicalLength = SkEndian_SwapBE32(tableSize); | 1675 entry->logicalLength = SkEndian_SwapBE32(tableSize); |
| 1676 | 1676 |
| 1677 dataPtr += (tableSize + 3) & ~3; | 1677 dataPtr += (tableSize + 3) & ~3; |
| 1678 ++entry; | 1678 ++entry; |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 return stream; | 1681 return stream; |
| 1682 } | 1682 } |
| 1683 | 1683 |
| 1684 SkStream* SkFontHost::OpenStream(SkFontID fontID) { | |
| 1685 SkASSERT(!"SkFontHost::OpenStream is DEPRECATED\n"); | |
| 1686 return NULL; | |
| 1687 } | |
| 1688 | |
| 1689 /////////////////////////////////////////////////////////////////////////////// | 1684 /////////////////////////////////////////////////////////////////////////////// |
| 1690 | 1685 |
| 1691 #include "SkStream.h" | 1686 #include "SkStream.h" |
| 1692 | 1687 |
| 1693 void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) { | 1688 void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) { |
| 1694 SkFontDescriptor desc; | 1689 SkFontDescriptor desc; |
| 1695 face->onGetFontDescriptor(&desc); | 1690 face->onGetFontDescriptor(&desc); |
| 1696 | 1691 |
| 1697 desc.serialize(stream); | 1692 desc.serialize(stream); |
| 1698 | 1693 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 } | 1848 } |
| 1854 | 1849 |
| 1855 void SkTypeface_Mac::onGetFontDescriptor(SkFontDescriptor* desc) const { | 1850 void SkTypeface_Mac::onGetFontDescriptor(SkFontDescriptor* desc) const { |
| 1856 this->INHERITED::onGetFontDescriptor(desc); | 1851 this->INHERITED::onGetFontDescriptor(desc); |
| 1857 SkString tmpStr; | 1852 SkString tmpStr; |
| 1858 | 1853 |
| 1859 desc->setFamilyName(get_str(CTFontCopyFamilyName(fFontRef), &tmpStr)); | 1854 desc->setFamilyName(get_str(CTFontCopyFamilyName(fFontRef), &tmpStr)); |
| 1860 desc->setFullName(get_str(CTFontCopyFullName(fFontRef), &tmpStr)); | 1855 desc->setFullName(get_str(CTFontCopyFullName(fFontRef), &tmpStr)); |
| 1861 desc->setPostscriptName(get_str(CTFontCopyPostScriptName(fFontRef), &tmpStr)
); | 1856 desc->setPostscriptName(get_str(CTFontCopyPostScriptName(fFontRef), &tmpStr)
); |
| 1862 } | 1857 } |
| OLD | NEW |