FontLab Forum
2012-05-22, 07:34:23 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: Shifting Composites (without messing up the components’ relative position)  (Read 1964 times)
mekkablue
Beta: FontLab Studio Mac
Hero Member
***

Karma: +0/-0
Austria Austria

Posts: 40



WWW
« on: 2009-08-05, 11:24:37 »

Is there a way in FLS5 to shift a range of characters (consisting of simple ones with nothing but paths, composites with paths, and ‘pure’ composites without paths) without changing the appearance of the glyphs?

When I shift all the characters by e.g. -40 horizontally, components may get shifted twice. See the included pictures (‘before’ and ‘after’): the base component of aring.smcp is shifted twice, first because a.smcp is shifted, and then again when aring.smcp is shifted, whereas the second component, ring, only gets shifted once, thusly changing the appearance of the composite glyph.

Is there a way to reliably shift all the glyphs without changing the glyphs’ appearances i.e. without changing the relative positions of components and paths within the composites?

TIA, Eric.


PS: Searching the archives, I found a Python script by Tim Ahrens from 2004, but I don’t think it does what I intend to do. But I am not sure I understood its purpose correctly.
Logged
mekkablue
Beta: FontLab Studio Mac
Hero Member
***

Karma: +0/-0
Austria Austria

Posts: 40



WWW
« Reply #1 on: 2009-08-05, 11:45:43 »

Quick note: I think I just found a workaround. Please correct me if I’m wrong.


1. Make sure that, in your composites, the base component is always the first component. In the above example, a.smcp must be the first component in aring.smcp.

2. Only shift the base glyphs, using the Adjust Sidebearings function, first adjusting the LSB by a negative, then the RSB by a positive value (or vice versa, if you want to shift to the right). Make sure the option Affect Composites is checked. In the above example, only a.smcp is treated that way, aring.smcp will follow.

3. Now, in the font window, it should be easy to see which glyphs were not transformed (= no black bar at the top of the glyph box). Apply the same procedure to those glyphs, and you're done.


UPDATE: Sorry, the above procedure does NOT work as intended. Composite glyphs are not shifted at all, or, more precisely, the component shift is compensated in the composites! The composites do not look any different from before. I'll do some more research and post my results.

UPDATE 2: It seems like you can safely use the Affect Composites option for the purpose, but it will break the Undo function: If you try to undo the modification of a composite, only base glyphs and regular paths will shift back, not the diacritic components. So make sure you safe the font first. That way you can always revert to the previous version.
« Last Edit: 2009-08-05, 12:50:00 by mekkablue » Logged
Ray Larabie
Hero Member
*****

Karma: +1/-0
Posts: 125



WWW Email
« Reply #2 on: 2010-04-14, 02:15:24 »

This may not be what you're looking for but I solved a similar problem by changing the sidebearings. So if you wanted to shift -40 horizontally you could use transform to add 40 to the right sidebearing and lose 40 from the left sidebearing. I don't know if that's what you're looking for but altering sidebearings instead of shifting can in some cases have a different effect.
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!