Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closest cross-platform alternative to Direct2D/DirectWrite? [closed]

What are some good cross-platform alternatives to Windows-specific 2D APIs? I'm looking for an API for rendering simple geometric objects as well as an API for rendering text with subpixel antialiasing (ClearType) and OpenType support, specifically support for hinting.

like image 778
Dmitri Nesteruk Avatar asked Sep 20 '25 22:09

Dmitri Nesteruk


2 Answers

OpenGL is the defacto cross-platform graphics API. OpenGL supports the FreeType and OpenType libraries. Newer versions of FreeType (2.7+) have support for sub-pixel hinting similar to what DirectWrite offers.

like image 60
D. Christopher Avatar answered Sep 22 '25 13:09

D. Christopher


Have a look at the Simple DirectMedia Layer (SDL), it contains exactly what you need. SDL_ttf is an extension to libsdl that provides functionality for rendering of text.

like image 33
arjen1988 Avatar answered Sep 22 '25 13:09

arjen1988