Giter Site home page Giter Site logo

salshaaban / bidirenderer Goto Github PK

View Code? Open in Web Editor NEW
47.0 6.0 10.0 617 KB

An example / demo application that illustrates the shaping and layout of complex text in bidirectional paragraphs using FriBidi, FreeType, and HarfBuzz

License: BSD 2-Clause "Simplified" License

QMake 1.14% C++ 98.86%

bidirenderer's Introduction

BidiRenderer:

This is a test application I'm using to help me understand the Unicode bidirectional algorithm, and the process of rendering complex scripts and RTL text. It's the basis for a more complex version of the code that has been used in VLC's FreeType module for subtitles/OSD rendering.

Some options do not produce visible effects on all fonts. For example removing zero-width characters when the font can already handle them properly. The font Arial is good here since it shows zero-width spaces, Unicode control characters, etc.

See the wiki for build instructions on Windows and Linux/Unix.

I welcome any comments or corrections, particularly regarding language-specific issues.

alt tag

bidirenderer's People

Contributors

salshaaban avatar

Stargazers

buzai avatar  avatar Masanori Ogino avatar Ger Hobbelt avatar  avatar  avatar  avatar soron-liu avatar  avatar  avatar  avatar Ahmed Abdalla avatar Xarvie avatar Bryant Drew Jones avatar  avatar Mahmoud Hosseinipour avatar  avatar  avatar Soar avatar 梁永祥 avatar  avatar Cosmin Apreutesei avatar vs avatar Mikael Sand avatar Frans de Jonge avatar DK Dhilip avatar  avatar José Solé avatar Parth Wazurkar avatar Safa Alfulaij avatar  avatar Diego Alcântara avatar David Ziman avatar Susmit avatar  avatar Christopher Baker avatar Abdelrahman Ghanem avatar WangBin avatar Islam Ali avatar Abdellah C. avatar  avatar Suhail Alkowaileet avatar  avatar Allen Bargi avatar Behdad Esfahbod avatar Santhosh Thottingal avatar Mohammad Reza Taesiri avatar

Watchers

Behdad Esfahbod avatar James Cloos avatar  avatar  avatar  avatar Éverton Antunes de Oliveira avatar

bidirenderer's Issues

Build instructions

Can you please include a makefile or other build instructions? Thanks.

Line width issue

The assert in GlyphString::newLine() is failing at times, when changing the max line width.
The problem, as far as I can see, is that GlyphString::layout() performs line breaking with approximate calculations based only on xAdvance values.
I don't think we can do any better in layout() because we don't yet know the reordering information.
The only fix I can think of is for newLine() to return an error whenever that occurs and layout() should try again with a different endOffset.
Or maybe there's a simpler way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.