aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_fontconfig.cpp
Commit message (Collapse)AuthorAge
* Remove now unused source files.Gravatar bungeman2016-08-02
| | | | | | | | | These files have been renamed and exist only as stubs for transition reasons. Remove these now unused stubs. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review-Url: https://codereview.chromium.org/2197423003
* Rename FontConfigInterface font manager files.Gravatar bungeman2016-08-02
| | | | | | | | | | | | These files are now so badly misnamed that it is causing problems. The original files are kept as shells until Chromium and PDFium can be updated. After Chromium and PDFium builds are updated, the old files will be removed and the cmake and bzl builds will be updated. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199973002 CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review-Url: https://codereview.chromium.org/2199973002
* Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (patchset #1 id:1 of ↵Gravatar reed2016-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1948193002/ ) Reason for revert: broken the Mac and Linux builders, e.g.: https://build.chromium.org/p/chromium/builders/Mac/builds/15151 https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052 Original issue's description: > SK_DECLARE_STATIC_MUTEX -> static SkMutex > > There's no need to use a macro to declare static SkMutexes any more > (and there's likewise no need to restrict them to global scope). > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002 > > Committed: https://skia.googlesource.com/skia/+/5e56cfd3fa1041dbb83899844fb92fa9a2ef1009 TBR=mtklein@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/1945353003
* SK_DECLARE_STATIC_MUTEX -> static SkMutexGravatar mtklein2016-05-04
| | | | | | | | | | There's no need to use a macro to declare static SkMutexes any more (and there's likewise no need to restrict them to global scope). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002 Review-Url: https://codereview.chromium.org/1948193002
* Clean up SkFontConfigInterface implementation.Gravatar bungeman2016-05-02
| | | | | | | | | | | | | | | | | | Renames some classes to avoid confusion with FontConfig. Removed direct calls to FontConfig instead of calling FCI. Moves the globals and factory to one (optional) file. Moves font management code from typeface to font manager. Adds index to fonts created from streams. Associates FCI typefaces with the FCI instance which provides its identity. Simplifies the singleton initialization. Review-Url: https://codereview.chromium.org/1936213002
* Remove requestedStyle from SkTypefaceCache.Gravatar bungeman2016-04-14
| | | | | | | | | | | | The typeface cache contains typefaces which can be compared against to determine if an already known typeface will work instead of creating a new typeface id. This is primarily for sharing scaler contexts. How that typeface was requested is not relevant to this comparison, so don't cache it. Request caching must be handled separately. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879423002 Review URL: https://codereview.chromium.org/1879423002
* Remove SK_VERY_LEGACY_CREATE_TYPEFACE.Gravatar bungeman2016-04-13
| | | | | | | | | The flag and code it guards are no longer used. TBR=reed This just removes dead code. Review URL: https://codereview.chromium.org/1882803002
* Begin switch to SkFontStyle for legacy calls.Gravatar bungeman2016-04-12
| | | | | | | | | | | | | | | | | | | This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides only the old interface. Ideally, everyone would switch directly to SkFontMgr and use one of the newer calls, but there is currently no path for current users to get there. This updates all the internals to use SkFontStyle, after switching these over the higher level APIs can be switched. The Chromium follow on patch can be seen at https://crrev.com/1877673002 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923002 TBR=reed This doesn't really change API, just modernizes it. Review URL: https://codereview.chromium.org/1873923002
* Increase request cache size.Gravatar bungeman2016-04-08
| | | | | | | BUG=chromium:424082 See comment #63. Review URL: https://codereview.chromium.org/1875733002
* Add request cache to SkFontHost_fontconfig.Gravatar bungeman2016-02-17
| | | | | | | | | | | The current code deduplicates SkTypeface instances as all font lookups should for better use of the glyph cache. This adds a request cache as well, so that repeated recent requests will return the cached result instead of doing a full lookup. BUG=chromium:424082, chromium:444894 Review URL: https://codereview.chromium.org/1683883002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Clean up a few includes, introduce iwyu.Gravatar bungeman2015-07-29
| | | | | | | | | The current include-what-you-use with current clang is much less noisy and more useful than it has been in the past. This change introduces a few IWYU directives (which are helpful documentation for humans as well) and fixes a few sets of includes. Review URL: https://codereview.chromium.org/1207893002
* Font variations.Gravatar bungeman2015-05-20
| | | | | | | | | | | | Multiple Master and TrueType fonts support variation axes. This implements back-end support for axes on platforms which support it. Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97 Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9 Review URL: https://codereview.chromium.org/1027373002
* Revert of Font variations. (patchset #26 id:500001 of ↵Gravatar robertphillips2015-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1027373002/) Reason for revert: Appears to be breaking Linux ARM bots: FAILED: /usr/local/google/home/mosaic-role/slave/repo_clients/chromium_tot/chromium/src/../../prebuilt/toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-g++ ... -o obj/third_party/skia/src/ports/skia_library.SkFontHost_FreeType.o ../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:37:31: fatal error: freetype/ftmm.h: No such file or directory #include FT_MULTIPLE_MASTERS_H ^ compilation terminated. Original issue's description: > Font variations. > > Multiple Master and TrueType fonts support variation axes. > This implements back-end support for axes on platforms which > support it. > > Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97 > > Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9 TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1139123008
* Font variations.Gravatar bungeman2015-05-14
| | | | | | | | | | Multiple Master and TrueType fonts support variation axes. This implements back-end support for axes on platforms which support it. Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97 Review URL: https://codereview.chromium.org/1027373002
* Revert of Font variations. (patchset #21 id:400001 of ↵Gravatar bungeman2015-05-13
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1027373002/) Reason for revert: Mac failing to build due to CFNumberType in Chromium Canary. Original issue's description: > Font variations. > > Multiple Master and TrueType fonts support variation axes. > This implements back-end support for axes on platforms which > support it. > > Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97 TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1128913008
* Font variations.Gravatar bungeman2015-05-13
| | | | | | | | Multiple Master and TrueType fonts support variation axes. This implements back-end support for axes on platforms which support it. Review URL: https://codereview.chromium.org/1027373002
* Remove SkFontHost includes and friends.Gravatar bungeman2015-02-23
| | | | | | | SkFontHost no longer exists as a class, so remove the includes and stop making it a friend. Review URL: https://codereview.chromium.org/943333004
* Clarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.Gravatar bungeman2015-02-19
| | | | | | | | This should have no real effect on behavior, but cleans up some names and removes an unused parameter. This is a step toward separating the SkTypeface cache from the request cache. Review URL: https://codereview.chromium.org/936893002
* Remove FontConfigTypeface::getFamilyName().Gravatar bungeman2015-02-18
| | | | | | | This method is hiding a method of the same name from the superclass. This is confusing and error prone, and doesn't really add anything. Review URL: https://codereview.chromium.org/924333003
* SkTypeface to use SkStreamAsset.Gravatar bungeman2015-01-27
| | | | | | | SkTypeface already requires typeface streams to support SkStreamAsset in practice, and in practice all users are already supplying them. Review URL: https://codereview.chromium.org/869763002
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* Replace SkTypeface::Style with SkFontStyle.Gravatar bungeman2014-10-20
| | | | | | Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20 Review URL: https://codereview.chromium.org/488143002
* Revert of Replace SkTypeface::Style with SkFontStyle. (patchset #9 id:160001 ↵Gravatar mtklein2014-10-20
| | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/488143002/) Reason for revert: CrOS GM failures: [*] 2 ExpectationsMismatch: fontmgr_iter_565.png fontmgr_iter_8888.png Original issue's description: > Replace SkTypeface::Style with SkFontStyle. > > Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20 TBR=reed@google.com,bungeman@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/667023002
* Replace SkTypeface::Style with SkFontStyle.Gravatar bungeman2014-10-20
| | | | Review URL: https://codereview.chromium.org/488143002
* Serialize the font index.Gravatar bungeman2014-09-18
| | | | | | | | | BUG=skia:1186 R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/567013002
* Add onGetFamilyName to SkTypeface.Gravatar bungeman2014-09-17
| | | | | | | | | | | This speeds up and documents this particular feature of SkTypeface and also frees up SkFontDescriptor to be used only in serialization. R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/574873002
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Remove SK_FONT_HOST_DOES_NOT_USE_FONTMGR and guarded code.Gravatar bungeman2014-08-20
| | | | | | | | | | This define is no longer needed or set, so remove it from the code. R=tomhudson@google.com, djsollen@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/488083004
* Update find_name_and_attributes to take ttc index and rename to ↵Gravatar bungeman2014-07-11
| | | | | | | | | | | | SkTypeface_FreeType::ScanFont. The name 'ScanFont' is to mirror the naming convention of similar functions in FontConfig. R=tomhudson@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/382053003
* Uses optional mutex to guard construction of the singleton, whichGravatar tomhudson2014-07-01
| | | | | | | | | | | | | | | | | initializes the non-threadsafe libfontconfig. Without this change, Skia's parallel path ops test runner crashes 6/10 and hangs 2/10 on startup; with this change, 0/10 problems. BUG=skia:2693 R=mtklein@google.com, bungeman@google.com, reed@google.com Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8 Committed: https://skia.googlesource.com/skia/+/60b08a0adfe73f593af62c8d3f55958438360e1b Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/355573006
* Revert of Fix race condition in parallel font initialization. ↵Gravatar mtklein2014-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/355573006/) Reason for revert: canaries still slightly broken Original issue's description: > Fix race condition in parallel font initialization. > > Uses a mutex to guard construction of the singleton, which initialies > the non-threadsafe libfontconfig. Without this change, the parallel > path ops test runner crashes 6/10 and hangs 2/10 on startup; with this > change, 0/10 problems. > > BUG=skia:2693 > R=mtklein@google.com,bungeman@google.com > > Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8 > > Committed: https://skia.googlesource.com/skia/+/60b08a0adfe73f593af62c8d3f55958438360e1b R=bungeman@google.com, reed@google.com, tomhudson@google.com, tomhudson@chromium.org TBR=bungeman@google.com, reed@google.com, tomhudson@chromium.org, tomhudson@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2693 Author: mtklein@google.com Review URL: https://codereview.chromium.org/354133004
* Fix race condition in parallel font initialization.Gravatar tomhudson2014-07-01
| | | | | | | | | | | | | | | | Uses a mutex to guard construction of the singleton, which initialies the non-threadsafe libfontconfig. Without this change, the parallel path ops test runner crashes 6/10 and hangs 2/10 on startup; with this change, 0/10 problems. BUG=skia:2693 R=mtklein@google.com, bungeman@google.com, reed@google.com, tomhudson@google.com Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8 Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/355573006
* Revert of Fix race condition in parallel font initialization. ↵Gravatar reed2014-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/355573006/) Reason for revert: breaks chrome builds Original issue's description: > Fix race condition in parallel font initialization. > > Uses a mutex to guard construction of the singleton, which initialies > the non-threadsafe libfontconfig. Without this change, the parallel > path ops test runner crashes 6/10 and hangs 2/10 on startup; with this > change, 0/10 problems. > > BUG=skia:2693 > R=mtklein@google.com,bungeman@google.com > > Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8 R=mtklein@google.com, bungeman@google.com, reed@google.com, tomhudson@google.com, tomhudson@chromium.org TBR=bungeman@google.com, mtklein@google.com, reed@google.com, tomhudson@chromium.org, tomhudson@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2693 Author: reed@chromium.org Review URL: https://codereview.chromium.org/365503003
* Fix race condition in parallel font initialization.Gravatar tomhudson2014-06-30
| | | | | | | | | | | | | | Uses a mutex to guard construction of the singleton, which initialies the non-threadsafe libfontconfig. Without this change, the parallel path ops test runner crashes 6/10 and hangs 2/10 on startup; with this change, 0/10 problems. BUG=skia:2693 R=mtklein@google.com, bungeman@google.com, reed@google.com, tomhudson@google.com Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/355573006
* Factory methods for heap-allocated SkTypeface objects.Gravatar commit-bot@chromium.org2014-04-07
| | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkTypeface and its subclasses non-public and instead provides factory methods for creating these objects on the heap. BUG=skia:2187 R=scroggo@google.com, bungeman@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/227693003 git-svn-id: http://skia.googlecode.com/svn/trunk@14080 2bbb7eff-a529-9590-31e7-b0007b416f81
* Android FontHost cannot use FontMgr yet.Gravatar bungeman@google.com2013-11-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12221 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SK_FONTHOST_USES_FONTMGR.Gravatar bungeman@google.com2013-11-11
| | | | | | Review URL: https://codereview.chromium.org/66783003 git-svn-id: http://skia.googlecode.com/svn/trunk@12217 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix fontconfig backend to only cache new fonts if their outName was uniqueGravatar reed@google.com2013-09-18
| | | | | | | | | BUG= R=bungeman@google.com Review URL: https://codereview.chromium.org/23710072 git-svn-id: http://skia.googlecode.com/svn/trunk@11364 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update the freetype backed fonthost to keep the style and fixed width ↵Gravatar djsollen@google.com2013-09-06
| | | | | | | | | | | | attributes for a font stream. This fixes a regression in Android when switching from FontHost_android R=reed@google.com Review URL: https://codereview.chromium.org/23966003 git-svn-id: http://skia.googlecode.com/svn/trunk@11134 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement onGetTableTags and onGetTableData on Windows.Gravatar bungeman@google.com2013-08-01
| | | | | | | | | Implements these and removes default implementation, making the declaration in SkTypeface pure virtual. Review URL: https://codereview.chromium.org/20672004 git-svn-id: http://skia.googlecode.com/svn/trunk@10500 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-08-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10477 2bbb7eff-a529-9590-31e7-b0007b416f81
* adapt FontConfig to use SK_FONTHOST_USES_FONTMGRGravatar reed@google.com2013-07-31
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/21331003 git-svn-id: http://skia.googlecode.com/svn/trunk@10463 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix leak in SkFontHost_fontconfig temporary code.Gravatar bungeman@google.com2013-06-06
| | | | | | | https://codereview.chromium.org/16525003 git-svn-id: http://skia.googlecode.com/svn/trunk@9460 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix issues related to resolving fonts based on name.Gravatar djsollen@google.com2013-06-05
| | | | | | | | | 1) non-system font files are not added to the cache. 2) We cache the default fonts for quick lookup. Review URL: https://codereview.chromium.org/16439004 git-svn-id: http://skia.googlecode.com/svn/trunk@9441 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkStream.Gravatar bungeman@google.com2013-05-29
| | | | | | | https://codereview.chromium.org/15298009/ git-svn-id: http://skia.googlecode.com/svn/trunk@9312 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move the FontConfigTypeface class into private header.Gravatar djsollen@google.com2013-05-15
| | | | | | | | R=reed@google.com Review URL: https://codereview.chromium.org/15111004 git-svn-id: http://skia.googlecode.com/svn/trunk@9154 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9117 2bbb7eff-a529-9590-31e7-b0007b416f81
* add separate impl file for SkFontMgr_fontconfig, so we don't poluteGravatar reed@google.com2013-05-13
| | | | | | | | | | | SkFontHost_fontconfig, which should be sharable w/ android. Eventaully we will remove that FontHost file completely, and just use the SkFontMgr. R=djsollen@google.com Review URL: https://codereview.chromium.org/15077008 git-svn-id: http://skia.googlecode.com/svn/trunk@9114 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add missing unistd.h include after r8765.Gravatar commit-bot@chromium.org2013-04-22
| | | | | | | | | | | TEST=Build with GCC 4.8.0 and glibc 2.17. R=reed@google.com, jvanverth@google.com, bsalomon@google.com Author: raphael.kubo.da.costa@intel.com Review URL: https://chromiumcodereview.appspot.com/14401007 git-svn-id: http://skia.googlecode.com/svn/trunk@8809 2bbb7eff-a529-9590-31e7-b0007b416f81