Historically, SkTypeface.charsToGlyphs assumed the data was already in glyphs. So a UTF32 data array would pass the number of glyphs. Since that method was removed, we switched to SkFont.textToGlyphs. This worked in bytes. As a result, we need to make sure we convert from glyph count to byte count when we use it.
- Make SKFont glyph-only
- hide the SKFont members that take strings/bytes
- hide the overloads that return arrays (promote the use of the "out span")
- expose string/byte members on SKPaint, and only expose the returning array (for consistency)
- use a single instance of SKFont for SKTypeface glyph members
- Add glyph-based MeasureText
* Improve the Vulkan APIs
- removed the context argument as this is unused as well as an older C/C++ feature
- added a SharpVk version of the GetProc property.
* Removed the context argument (this is more an older C/C++ feature/requirement)
* Expose the WebGL APIs
* Improve the GRGlInterface and GPU delegates
- removing the object context for the GPU construction
- obsoleted GRGlGetProcDelegate in favour of the better named GRGlGetProcedureAddressDelegate
- renamed GRVkGetProcDelegate to GRVkGetProcedureAddressDelegate
- use "ProcedureAddress" instead of "Proc" to show that it is the "address" not the actual procedure
- reworked the GRGlInterface
- use the new non-context delegates
- use better naming: Create*
- adding WebGL
- created a SharpVk-specific delegate GRSharpVkGetProcedureAddressDelegate
- use actual types instead of IntPtr
* Reduce the using obsolete warnings
- still a few left, mainly the colorspace and text blob
* Switch the way GRGlInterface.Create() works
- first try OpenGL as that is actually what is expected
- don't explode on an error, return null, like the rest
* Update API usages
Google deleted `DrawTextOnPath` so this PR adds it back along with other text-related APIs.
- Added an overload for `SKCanvas.DrawTextOnPath` that disables glyph warping
- Wrapped the `ArrayPool<T>.Shared` logic into a disposable util method
- Renamed `SKFont.GetPath` to `SKFont.GetTextPath` so that it makes more sense
- Added `SKFont.GetTextPathOnPath` to get the text path, but following another path instance (warps glyphs)
- Removed/obsoleted the non-glyph overloads for `SKTextBlobBuilder.Add*Run`
- Added a set of `SKTextBlob.Create` overloads that are used to make "string" runs
- A few other small changes to make the API better
- Fixes#1183
* Correct company name
* Fix targets file
* Hide native files from project tree
* Add benchmark project
* Add a feature to skip the object registration
- ISKSkipObjectRegistration
- objects implementing this interface will not be registered in the global dictionary
- major perf boos (2.84x) due to not having to look up in a dictionary
- use direct constructor instead of object factory
* Throw an exception in "debug" builds
Several iterations of development to come to this:
* [UWP] Fix the ARM build and add ARM64
* [Win32] GDI is optional - and we don't want it
* Update harfbuzz to v2.6.2
* Use Docker
* Use a later version of the linux tools
* Use VS 2019
* Use Xcode 11
* Go all in with MSVC 14.2
* Disable the Tizen builds for now
* Add support for manually specifying VS (This can be done in a few ways, but the common way would be: --vsinstall='C:\PF\MVS\XXX\YYY')
* Update OpenJDK and Tizen Studio
* Using C++ 17
* Also added a THROW_ON_TEST_FAILURE env var to allow previews to be put out when tests are still failing
* Support basic text alignment
* Implement breakText in native code.
* Expose a generic, writable span for the pixels
* Fixes#1240
* "Cache" the info object in size so we don' have to hop the interop.
* Raw pixels depend on the CPU endianness
* Rework the assembly fixtures
* Fix concurrency issue with handle registration
* Save several ms and useless allocations
* Make sure to correctly own objects
* Native objects may be disposed at any time
* Keep the bitmap alive when just using the pixmap
* Cache the "static" font styles
A few changes and improvements:
- add some helper members
- improved the SKBitmap.CopyTo and related members
- added Encode(...) to SKBitmap
- added Encode(...) with a .NET Stream to SKBitmap, SKImage and SKPixmap
- start the move from SKEncoding to SKTextEncoding
- added more tests
- generator now has a validator for ensuring all declarations have implementations
- added equality members to all structs
Bugs Fixed
- Bitmaps copied with SKBitmap.Copy sometimes have incorrect colors
- The GC would sometimes collect a stream that was being used by a PDF document
When the paint encoding is anything but GlyphId, the underlying allocation fails. This results in not only strange behaviour, but also invalid data. The run buffer is given a size, but nothing was allocated. This does 2 things:
- if a buffer is null, override the size
- if the encoding is not glyph, then change it temporarily
When the paint encoding is anything but GlyphId, the underlying allocation fails. This results in not only strange behaviour, but also invalid data. The run buffer is given a size, but nothing was allocated. This does 2 things:
- if a buffer is null, override the size
- if the encoding is not glyph, then change it temporarily
* Make more members readonly (the generator now makes the equality members readonly)
* split the SKMatrix file into SKMatrix44, SKRotationScaleMatrix, SK3dView
* split the SKColorSpace structs/classes into a separate file
* reworked/renamed all the poorly designed SKMatrix (and related) members to be actually useful
* Make sure the obsolete items are invisible
* Make sure everything implements IEquatable<T>
* Update docs and changelogs
* ISKGLViewController is public