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

Some cleanup on Layer_Freetype #1653

Merged
merged 8 commits into from Aug 25, 2020
Merged

Conversation

rodolforg
Copy link
Contributor

No description provided.

@rodolforg
Copy link
Contributor Author

Yes, I know probably all this layer will be replaced by Pango rendering instead of direct usage of FreeType library.
However, I'm having some size/position difference issues with this replacement. So, for now, let me improve this layer…

@rodolforg
Copy link
Contributor Author

@ice0 could this be a CMake specific issue?

@ice0
Copy link
Collaborator

ice0 commented Aug 24, 2020

@rodolforg sure. CMake still could have different compilation flags and defines. I will take a look.

@ice0
Copy link
Collaborator

ice0 commented Aug 25, 2020

The problem is in that place:

// special_family.option3 = nullptr
possible_families.push_back(special_family.option3);

This does not happen when FontConfig is installed, but it may need to be considered.

@ice0
Copy link
Collaborator

ice0 commented Aug 25, 2020

Now it fails because of this:

// i = 6; (but special_font_family_db has only 5 items)
for (int i = 0; special_font_family_db[i].alias; i++) {

I changed it to:

int count = sizeof(special_font_family_db) / sizeof(special_font_family_db[0]);
for (int i = 0; i < count && special_font_family_db[i].alias; i++) {

P.S. Fixed CMake FontConfig search, please rebase.

@ice0 ice0 merged commit bb1a80b into synfig:master Aug 25, 2020
@ice0
Copy link
Collaborator

ice0 commented Aug 25, 2020

Merged. Thank you!

@rodolforg rodolforg deleted the some-cleanup-freetype branch November 15, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants