Skip to content
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
This repository was archived by the owner on Jul 26, 2026. It is now read-only.

Example on how to draw with this #25

Closed

Description

@sandmor

So, I never use harfbuzz and I'm a bit lost about how to use this and integrate with ttf-parser or rusttype, can you provide an example of using this to draw non-latin text, I'm talking of an example with tiny-skia, ttf-parser and this or something that you want.
Thank you in advance

Activity

  1. RazrFalcon commented on Dec 12, 2020

    @RazrFalcon
    Collaborator

    Yes, I've planned to write such example. It would be a bit rudimentary, because font fallback and emojis must be handled by the caller, but other than that it should be fine.

  2. xobs commented on Dec 13, 2020

    @xobs

    I have a terrible, awful repo up at https://git.xobs.io/xobs/rust-font-test that you're welcome to steal from. That repository is an experiment in memory usage and rendering.

    It uses rusttype for rendering.

    It even renders emoji properly, and does a decent job of Arabic.

  3. sandmor commented on Dec 15, 2020

    @sandmor
    Author

    @xobs Thank you

  4. rnikander commented on Dec 29, 2024

    @rnikander

    When I call shape, should the GlyphPositions I get back have y_offset set to something other than zero? Mine are all zero. I'm just trying to draw a simple string with this and ab_glyph. And I can't figure out how to shift the glyphs in the Y dimension.

  5. asibahi commented on Dec 29, 2024

    @asibahi
    Contributor

    I used rustybuzz and ab_glyph in a project of mine. Code should be here https://github.com/asibahi/nun/blob/master/src/draw.rs

  6. locked and limited conversation to collaborators on Dec 29, 2024
  7. converted this issue into a discussion #155 on Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions