Cleartype hinting questions

ebensorkin's picture

Has anybody here hinted for cleartype?

Would you be willing to describe how it is the same as & how it differs from hinting for true type? Also, does anybody know if it is basically the same hinting data? So for example - if it is the same data, then theoretically you cannot have a font hinted for both true type & clear type at the same time without making a compromise in each. Correct? ( Or making two fonts - hinted one way & another one hinted the other way).

Also any hints about a baseline setup in terms of equipment & software would be good to know about too. I was thinking of buying a LCD screen to replace my CRT but I want to make sure it will be useful for checking my hinting. I think you need a minimum ppi of 120+ or so. Correct? Since the ppi shifts on monitors now alot what is a good strategy if you are not going to buy 3 reference monitors? ( check your enighbor's?)

If I am not mistaken all the talk on typophile about cleartype so far has been in reaction to it rather than talking about how to do it. Did I miss somehing?

Thanks!

Jack B. Nimblest Jr.'s picture

I've never hinted cleartype, but, I've been close to those who have...

" if it is the same data, then theoretically you cannot have a font hinted for both true type & clear type at the same time without making a compromise [to one or the other]."

I think that's what you mean....?

ebensorkin's picture

Yes. That's what I meant. True type hinting is geared to b/w bitmaps and is somewhat heavy handed at times where as ClearType hinting would be softer - so the hinting (if it is the same data source) could probably not do double duty.

Do you think you could talk to your fellow hinters a bit & see what they say?

I have been sent a little info too which I will post here soon.

vinceconnare's picture

I have and if you are manually hinting with Microsoft's Visual TrueType there are 2 things you can do.

It helps to have the ClearType version of VTT and know how to do low level TrueType.

You need to check the rasterizer with code to see if 'you are in ClearType'. This is a standard function in the 'fpgm' that VTT has and what you need to do is do the same thing as is done for Greyscale checking in VTT's function 84.

Then in the glyph's instruction that you would like to alter you would have to use low level TrueType to call function 77. That is the function used in VTT for binary or grey scale delta hints.

By adding to function 84 and copying the same method that VTT does for Grey and using the GETINFO instruction and the value 8192 instead of 4096 for grey, you can hint for grey, binary or CT.

Also CT ignors Delta hints. You can force it to not ignores them by sticking this in the 'prep'

/* use Deltas in ClearType */
#PUSHOFF
#PUSH, 4, 3
INSTCTRL[]
#PUSHON

this is a bit dangerous because most Deltas are for Grey or binary.

vincent

ebensorkin's picture

Wow! Vince, thats so awesome. Thank you!

Si_Daniels's picture

One thing to watch is spacing. You get the best results if you design and lightly hint a font with ClearType in mind, taking advantage of sub-pixel spacing as well as rendering - the ClearType Collection approach. But if you then decide that b/w rendering is important you can add contextual non-CT hints to improve the b/w rendering, but in the cases I've seen the spacing suffers under b/w even if the bitmaps are nice.

ebensorkin's picture

Thanks! Simon!

BTW - any equipment related hints?

- or - process/design/testing hints?

Si_Daniels's picture

>BTW - any equipment related hints?

what set up do you have now? A cheapy laptop might be a good basic investment if you don't have one already. To be honest I wouldn't spend anything until you're up to speed with VTT - if you can't get there perhaps CT hinting is not a good hobby.

Si

vinceconnare's picture

Also as Si said hinting for CT is 'light' hinting. The hints in the Y direction are used and in the X direction they are not for the most part. Many people hinting for CT are hinting in Y and not doing much in X.

Also it's not worth spending too much time messing around with tweaking for a specific CT display (such as the normal CT mode in VTT). You don't know what kind of CT display the font will be used on. Or has the user tweaked their CT settings? Is the display horizontal or vertical? Is it a tablet PC ?

Generally all I've done is address some problems that CT creates such as diagonals have a tendancy to become heavy (as apposed to in Grey they are light). Some stems like the Capital H, I , L maybe light or heavy because they have a sub pixel that is darker than others. In these cases I use function 77 in the glyphs local instructions to move the outline. Function 77 acts like a delta hint and moves a point through a range of sizes. it checks a flag that is set by function 84 to see what mode the rasterizer is in. If we are in CT then the exception is processed.

vincent

vinceconnare's picture

An example of a hinted font, showing binary, grey and Cleartype then the final image is with the UC V using the above conditional change to move the points to fix the problem of the 'V' being too light and appearing short.

http://www.connare.com/cleartype_2.jpg

This is the VTT version of the UC 'V' with the original V on the left and the changed 'V' on the right.

http://www.connare.com/cleartype_1.jpg

Jack B. Nimblest Jr.'s picture

"True type hinting is geared to b/w bitmaps and is somewhat heavy handed"

Well, the hints are the same in TT and CT, as you know 'tis one hinting language...

The two rasterizers use incongruent theories of pixel recognition and don't interpret the hints the same. I find the whole CT activities list to be wanting from the failure to recognize an important typographic principle of low resolution being: that you can't hint parts of a font (safely) any more than you can stop part of a train, (safely). But they will try.

And, "don't worry" about spacing 'cause there is nothing you can do about it, MS's "quadrupled" the resolution and "solved" that problem, meaning you can't even control it if you want to...;) But VC's comments are, though masking some bias, accurate. E.G. when he says the diagonals get heavy, he's right!

svayambhu's picture

>By adding to function 84 and copying the same method that VTT does for Grey and using the GETINFO instruction and the value 8192 instead of 4096 for grey, you can hint for grey, binary or CT.

I am hinting Devanagari font using VTT and have 1 problem with cleartype only deltas (function 77). As I understand it is enough to change the definition of function 84 to make function 77 work for cleartype as for greyscale. I tried to do this but my knowledge is not enought - the change of value to 8192 is not enough, other selectors also must be changed.

By defoult the definition of 84 is such -

FDEF[],84
#BEGIN
#PUSHOFF
#PUSH,2,0
WS[] /* s[2] = grey scaling: off (by default) */
#PUSH,35,1 /* 35 = MS Rasterizer version 1.7 */
GETINFO[] /* 1 = tell GETINFO to give us the rasterizer version */
LTEQ[] /* 35 <= version ? */
#PUSH,64,1 /* 64 = highest rasterizer version assigned to MS */
GETINFO[] /* 1 = tell GETINFO to give us the rasterizer version */
GTEQ[] /* 64 >= version ? */
AND[] /* 35 <= version && version <= 64 ? */
IF[] /* if so, we're running MS rasterizer version 1.7 or higher */
#PUSH,4096,32 /* 4096 = flag returned by GETINFO if grey scaling bit is on */
GETINFO[] /* 32 = tell GETINFO to give us the grey scaling bit */
EQ[] /* 4096 == flag ? */
IF[] /* if so, we're running under grey scaling */
#PUSH,2,1
WS[] /* s[2] = grey scaling: on (by now) */
EIF[]
EIF[]
#PUSHON
#END
ENDF[]

In glyph program function 77 is written in this way - CALL[], 33, 64, 11, 2, 77 but visually do not take any effect.

Maybe somebody can help me - what must be changed in this definition to make function 77 work for cleartype?

Jack B. Nimblest Jr.'s picture

Mike?

Cheers!

svayambhu's picture

It is still my headache - how to make cleartype only deltas.

mike_duggan's picture

hi Mihail, can you tell me what the Version is of the VTT that you are using. Di you get the VTT software with the files that accompany it? In making your font, did you begin by importing the tables including the Font Program?

any details will help, and I will follow up with you

thanks

mike

svayambhu's picture

Michael, thanks for reply and attention,

I have received VTT 4.4 from MS Typography recently with templates files. I started working with "Prepare font" option - so all templates were imported in the font including the Font Program. I only entered my cvt's with cvt-deltas, so the font program and prep programs are not manually changed (I tried but not cuccessfully to modify definition of function 84). When I use greyscale-only deltas (right-click and drag) all works properly (CALL to function 76), but cleartype-only deltas are displayed only in VTT Talk and Glyph program (CALL to function 77) without any visual result - I think they will work when function 84 will ask and report selector of cleartype rasterizer (now it is asking about greyscale and report 32 selector).

So I simply don't know how to change this definition of 84 function - it must ask about rasterizer and report rasterizer's selector when CALL to function 77 is working. Or maybe I don't understand this question correctly.

svayambhu's picture

It seems that nobody hints for cleartype.

Jack B. Nimblest Jr.'s picture

>It seems that nobody hints for cleartype.

Well, you can only really hint in the y dimension.

I don't understand what Simon is saying here:

>One thing to watch is spacing.

VTT, as generally available, does not allow the right side bearing, that which defines the set width of the glyph, to be hinted.

>You get the best results if you design and lightly hint a font with ClearType in mind...

Can you clarify this?

>... taking advantage of sub-pixel spacing as well as rendering - the ClearType Collection approach.

How exactly?

Cheers!

Syndicate content Syndicate content