Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build Skia Sharp for only specific purposes? (e.g. for Font rendering only) #583

Closed
danReleases opened this issue Jul 20, 2018 · 1 comment

Comments

@danReleases
Copy link

I'd like to build a skia sharp library file (dynamic/shared) that will only be used for Font rendering, thus reducing the size of my program's dependencies. However, I am unable to find a way to configure Skia Sharp to only include certain parts of it and would like to know if there is any guide I can follow for this.

@mattleibow
Copy link
Contributor

SkiaSharp is already quite small, usually between 4-5 MB per platform architecture. The last few releases was actually a bug, see #573 and #584

To further reduce the size, you could have a look at building your own. We typically include everything because we don't know what you are going to be using. You can remove quite a bit.

It is relatively simple to build your own: https://github.com/mono/SkiaSharp/blob/v1.60.2/cake/BuildExternals.cake#L532-L559

In most cases, it is just a case of running gn to generate the build files - here you pass along all the bits that you want. and then either run ninja or ndk-build. In fact, this is how most people build for Linux: https://github.com/mono/SkiaSharp/wiki/Building-on-Linux#building

@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants