Jump to content
Alexander Sviridenkov

Custom text rendering

Recommended Posts

Just made this for fun. Canvas for HTML library which uses no system text/font API. Everything is processed inside library.
Fonts are loaded directly from TTF file/stream. Strings are converted into sequence of glyphs and transformed by various opentype features (kerming, glyph substitution/reposition, RTL, ligatures, etc.).
After that glyphs are converted to graphics paths and rendered using D2D FillGeometry method.
 
  • Like 7

Share this post


Link to post
Guest

Brilliant !

 

One question though,

Will you make that TTF parser a full editor (read and write) ?, because i genuinely think TTF edit component will have its fans, due that fact you can say to hell with image lists, also the rendering libs on all OS's are most fast in rendering fonts (highly optimized for speed), also fonts take less space than images.

 

So will such parser/editor be part in HCL, HEL, HOL or have its own package ?

Share this post


Link to post

Yes, font class can read and write TTF and WOFF, and also extract font of any format from PDF (CFF, PostScript, etc) and convert it to TTF (not simply wrap as CFF but convert outlines). Visual glyph editing can also be easily implemented using SVG.

Please check http://delphihtmlcomponents.com/FontBrowser.zip compiled demo, it shows all capabilities - read, write, extract, and contains visual glyph editor (simple HtPanel). Only around 100 lines of code.

BTW, font class can import glyphs from SVG path.

 

This is part of Office library.

 

Edited by Alexander Sviridenkov

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×