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

Upgrade freetype #144

Closed
wants to merge 3 commits into from
Closed

Upgrade freetype #144

wants to merge 3 commits into from

Conversation

@j4qfrost
Copy link

j4qfrost commented May 2, 2020

No description provided.

j4qfrost added 3 commits May 2, 2020
@jdm
Copy link
Member

jdm commented May 2, 2020

error[E0432]: unresolved import `fontconfig`

   --> src/sources/fontconfig.rs:236:9

    |

236 |     use fontconfig::fontconfig as ffi;

    |         ^^^^^^^^^^ use of undeclared type or module `fontconfig`

warning: unnecessary parentheses around block return value

    --> src/loaders/freetype.rs:1199:9

     |

1199 |         (self.to_f32() * (1.0 / 64.0))

     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses

     |

     = note: `#[warn(unused_parens)]` on by default

error[E0699]: the type of this value must be known to call a method on a raw pointer on it

   --> src/sources/fontconfig.rs:414:27

    |

414 |                 if string.is_null() {

    |                           ^^^^^^^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0432, E0699.

For more information about an error, try `rustc --explain E0432`.

error: could not compile `font-kit`.
[target.'cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios")))'.dependencies]
freetype = "^0.4.1"

[target.'cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios", target_arch = "wasm32")))'.dependencies]
servo-fontconfig = "0.4"
freetype = "^0.5.1"
Comment on lines -57 to +58

This comment has been minimized.

@jdm

jdm May 2, 2020

Member

Looks like this got messed up - we still need to depend on fontconfig, and the freetype dependency should still be conditional.

bors-servo added a commit that referenced this pull request Jun 1, 2020
Upgrade FreeType dep from 0.4.1 to 0.5.1

Hello!

I also needed the change seen in #144, so I decided to open my PR.  Are you open to bumping this version?  In my project, I am trying to use [servo/rust-freetype](https://github.com/servo/rust-freetype) v0.5.1, but since `font-kit` currently depends on FreeType v0.4.1 I get this error during compilation:

```
error: multiple packages link to native library `freetype`, but a native library can be linked only once

package `freetype-sys v0.11.0`
    ... which is depended on by `freetype v0.5.1`
    ... which is depended on by `kosmonaut v0.1.0 (/home/twilco/projects/kosmonaut)`
links to native library `freetype`

package `servo-freetype-sys v4.0.3`
    ... which is depended on by `freetype v0.4.1`
    ... which is depended on by `font-kit v0.7.1`
    ... which is depended on by `kosmonaut v0.1.0 (/home/twilco/projects/kosmonaut)`
also links to native library `freetype`
```

I could probably downgrade my `rust-freetype` version, but wanted to try this first.
@atouchet
Copy link
Contributor

atouchet commented Jun 8, 2020

This was done in #150 and #152.

@atouchet atouchet closed this Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.