Werner LEMBERG | 20 Oct 08:45 2014
Picon

Re: [ft] Problem using Apple sbix format ttf file


In March, Nick asked the following:

  Using the latest freetype 2.5.3 the Apple Color Emoji.ttf file on a
  Mac works fine. However freetype fails to load the glyphs using an
  iPhone's `AppleColorEmoji <at> 2x.ttf' file.

  It looks like either the iphone sbix format used is slightly
  different, or the png format has been customized...?

I've now had a closer look, and I can finally answer it :-) The format
of this font's sbix table is indeed different.  It uses an `rgbl'
graphic type, which is officially unsupported by Apple, according to
the recently published sbix specification.

  https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6sbix.html

It shouldn't be too hard to implement the `rgbl' type in FreeType,
since it appears to be an uncompressed format with four bytes per
pixel, but I doubt that it makes sense, given the fast pace of iOS
versions.

I suppose that recent emoji fonts of Apple use one of the much more
compact formats like `png' that should shrink the font size a lot.

    Werner
Werner LEMBERG | 18 Oct 11:07 2014
Picon

[ft] Telugu support in auto-hinter and ttfautohint


Folks,


I've added Telugu support to both FreeType's auto-hinter and
ttfautohint.  To be more precise, blue zone support is now available,
which should give better alignments.

Please test the git repositories and report any issues – since I don't
have real knowledge of this script it's likely that there are still
issues.


    Werner
_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype
Werner LEMBERG | 4 Oct 18:34 2014
Picon

Re: [ft] New ttfautohint release soon


> I have a similar issue with 'rod.ttf' that comes with windows ( I
> think ) It renders mono fine, but antialiasing on diagonales makes
> it blotchy when rendered higher grey scale.
> 
> any chance you can try that one too?

Please be more specific.  Which glyphs?  Which size?  And please
send images that show the problem.

    Werner
John Owen | 1 Oct 14:17 2014
Picon

[ft] How can I render monospace text in any font?

Given any typical font, not necessarily a monospace one, how can I
render text in a monospace style? I've tried messing around with
drawing the bitmaps of the glyphs individually, but I can never get
the x and y alignment between glyphs right. I'm using OpenGL and
python, but the answer should be adaptable to any graphics context or
language. I've also opened a question on SO if anyone wanted to use
that.

http://stackoverflow.com/q/26138577/1093155

Apologies if I screw something up, I'm new to mailing lists.
Phil Endecott | 27 Sep 17:30 2014

[ft] Metrics for pre-rendered glyphs - am I doing this right?

Dear List,

Thanks for helping with my earlier question.  I'm now going to 
describe what I'm doing to check if I've got it right - now that 
I don't have obvious off-by-one errors, it's hard to spot the 
more subtle mistakes even with a magnifier!

I have an OpenGL application in which I use FreeType to pre-render 
glyphs into a texture; when I want to draw text onto the display I 
use OpenGL to copy glyph rectangles from that texture to rectangles 
on the display.

In the simplest version, for each glyph I store the bitmap_left, 
bitmap_top and linearHoriAdvance values (all in 64ths of a pixel, 
though bitmap_left and bitmap_top are always whole numbers of pixels).  
Then drawing algorithm is (pseudo-code):

int x = x0, y = y0;  // in 64ths of a pixel
for each glyph {
  find the bitmap in the texture
  copy it to the screen with its bottom-left corner at
  ( round((x+bitmap_left)/64), round((y+bitmap_top-bitmap_height)/64) )
  x += linearHoriAdvance
  x += kerning  
}

Does that look reasonable?

For smaller font sizes, I am attempting to do sub-pixel horizontal 
positioning.  For each glyph, I store 2 or 4 (or more) bitmaps with 
(Continue reading)

Phil Endecott | 27 Sep 01:38 2014

[ft] bitmap_left description

Dear Experts,

The docs for bitmap_left say:

     This is the bitmap's left bearing expressed in integer
     pixels. Of course, this is only valid if the format is
     FT_GLYPH_FORMAT_BITMAP.

I'm rendering individual glyphs from a TrueType font using
FT_Load_Glyph() followed by FT_Render_Glyph().  Having done
that I had been struggling to work out the metrics for the
result.  Then I discovered that bitmap_left and bitmap_top
seem to tell me exactly what I need to know - but I had
been avoiding them because this not a bitmap font and the
description quoted above.

Is it OK to use bitmap_left/top after FT_Render_Glyph()?
Is this a documentation issue?

Thanks,  Phil.
Thomas H. Puzia | 26 Sep 20:39 2014
Picon

[ft] how to uninstall freetype

Hi there,

I installed freetype in a local directory on my MacPro (OS X 10.9.5) and am having trouble with running all my other programs now!

e.g.

:/Users/tpuzia/Science/local/lib> make
dyld: Symbol not found: __cg_png_create_info_struct
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /Users/tpuzia/Science/local/lib/libPng.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch


Please, help!

Thanks,
Thomas
___________________________________________________________

  Thomas H. Puzia, Institute of Astrophysics, Pontificia Universidad Catolica de Chile
  http://www.astro.puc.cl/~tpuzia

 
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this email by you is prohibited.

_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype
luserdroog . | 23 Sep 12:23 2014
Picon

[ft] Weird advance values after FT_Set_Transform()

Hello all,

I'm having some difficulty using FT_Set_Transform with FT_Render_Glyph.
The program in this gist demonstrates the problem.
https://gist.github.com/luser-dr00g/9a45058a5fe116fcab50

Having scaled, I appear to get a nice horizontal vector (512,0). But,
setting a matrix with 2x scaling and 45-degree rotation is yielding
unexpected values (1,1).

Does anyone have a clue what I've done wrong?
Werner LEMBERG | 15 Sep 18:15 2014
Picon

[ft] Gamma issues


I've just found this interesting site:

  http://www.4p8.com/eric.brasseur/gamma.html

Given that really most software today fails to correctly scale images
with proper gamma, there's no wonder that there are similar problems
with the gamma stuff in the FreeType's CFF module.  We are ahead of
time, it seems...

    Werner
Christopher Kurtis Koeber | 10 Sep 23:03 2014
Picon

[ft] deletion of pointer to incomplete type 'FT_LibraryRec_'; no destructor called

Hello,

 

So I have a working implementation of the FreeType library in my project and I wish to clean up the library when I am no longer using it like a good programmer should.

 

Anyway, I have an instance of the FreeType library declared like so:

 

FT_Library ft;

 

But when I try and call the deconstructor of the instance like so:

 

delete ft;

 

I get the following warning in my Visual C++ compiler:

 

Warning               1              warning C4150: deletion of pointer to incomplete type 'FT_LibraryRec_'; no destructor called

 

Is there something I am doing wrong?

 

Regards,

 

Christopher Kurtis Koeber

 

_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype
Louis Semprini | 12 Aug 18:41 2014
Picon

[ft] iOS 7 system font Helvetica Neue horribly mis-hinted with FreeType 2.5.3


Hello,

Thank you so much for the open source miracle that is FreeType.

I really hope I am doing something simple wrong here, because there must be thousands of iOS app vendors trying the same thing every day.  It seems all OpenGL iOS apps would want to do just what I am doing here.  Also, if indeed iOS uses FreeType for its own rendering, then this should definitely work ?!?!

I have some absolutely minimal FreeType code that just tries to render simple A-Z glyphs with the iOS system font, "Helvetica Neue Interface."

I am seeing FT results that are horribly disfigured like the attached file bad_hinting.png or you can see the same image here:

http://postimg.org/image/dplczjbeb/

As you can see, random character strokes are thick and random strokes are thin, as if FT were trying to fit my text to some coarse grid.

I ONLY see this disfigurement with the iOS Helvetica fonts (_H_Helvetica.ttc, _H_HelveticaNeue.ttc, _H_HelveticaNeueInterface.ttc).  Many other fonts are OK with my code including Arial Unicode MS, several Chinese fonts, Segoe UI, and several of the Google fonts like Noto.

I ONLY see the disfigurement if I use the TrueType bytecode hinter inside FT.   I do not see the disfigurement with FT auto-hinting or with hinting disabled.

Note these fonts do not contain any 'gasp' table.

My test is at 39 pixel em size. If I choose MUCH smaller sizes, I see even more extreme distortions, like for example the whole middle segment of a lowercase 'a' disappears.  If you like I can send more sample pix.

For testing purposes, you can download a sample font that shows the problem here:  http://s000.tinyupload.com/index.php?file_id=45977206462678571206

The testing font is a .ttc containing 7 .ttfs.  You can use any of the .ttfs to see the problem; I used the first .ttf in my test.

My code is essentially this (yes, my real code checks all error return values):

    FT_Library library = ft_get_library();
   
    FT_New_Face(library, filename, ttc_slot /*0*/, &ff.ft_face );

   FT_Set_Pixel_Sizes(ff.ft_face, 39, 39);
   
   FT_Load_Glyph(ff.ft_face,
                      glyph_index,
                      FT_LOAD_DEFAULT |
                      FT_LOAD_RENDER | // create actual bitmap!
                      0)

If I use FT_LOAD_FORCE_AUTOHINT or if I use FT_LOAD_NO_HINTING, the output I get is nice (a bit fuzzy).  But if I use FreeType's native TTF bytecode hinter by passing neither of those options, things go wonky as above.

I still get the same problem if I try to use FT_LOAD_NO_BITMAP and/or FT_LOAD_IGNORE_TRANSFORM.

p.s. before someone hijacks this thread by asking an unrelated question: although iOS apps cannot directly open the system .ttf/.ttc font files due to Apple fascism, it IS possible for an app to legally suck over all the bits of a TrueType file into its memory, as explained at http://stackoverflow.com/questions/3692812/on-ios-can-i-access-the-system-provided-fonts-ttf-file  and I'm sure thousands of OpenGL apps do this.  But this is not relevant to my question: the bug/problem I am explaining here happens even if you root your phone and open the font file directly, and even if you copy the .ttc file to a Windows computer and run FreeType there.


_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype

Gmane