FontLab Forum
2012-02-08, 20:40:53 *
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: Python script: Center anchors  (Read 4482 times)
Adam Twardoch (FontLab)
Product and marketing manager, Fontlab Ltd.
Administrator
Hero Member
*****

Karma: +12/-4
Germany Germany

Posts: 304


FontLab Studio 5.0.4, Mac OS X 10.4.11


WWW
« on: 2009-09-24, 21:01:00 »

Attached is a small Python script for FontLab Studio that will center all anchors in the currently selected glyphs in the Font Window (or currently active glyph in the Glyph Window) on the advance width.

Installation:

1. Download and unzip Center_anchors.py.zip from the link below.
2. Place Center_anchors.py into the FontLab/Studio5/Macros/System/Glyph folder as well as into the FontLab/Studio5/Macros/System/Font folder (see the FontLab Studio manual for the exact location of the Macros folder).
3. Restart FontLab Studio, select some glyphs in the Font Window or open a Glyph Window, right-click and choose the "Center anchors" script from the Macros context submenu. (Of course, the glyphs need to have some anchors for it to work).

The script will print the glyph names in which anchors were found as well as their x and y positions before and after the centering.

Cheers,
Adam
« Last Edit: 2009-09-24, 21:02:57 by Adam Twardoch (FontLab) » Logged
jamespuckett
Beta: FontLab Studio Mac
Hero Member
***

Karma: +2/-0
Posts: 139


Email
« Reply #1 on: 2009-10-23, 23:46:08 »

Thanks, Adam!
Logged
Tags: python  fls  fontlab studio  anchors 
Pages: [1]
  Print  
 
Jump to:  

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