Anchor types

View: New views
1 Messages — Rating Filter:   Alert me  

Anchor types

by Alexey Kryukov-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

George,

I've noticed there is a small inconsistency in the legacy scripting
interface: anchor type names returned by GetAnchorPoints() are
different from those expected by AddAnchorPoint(). I think the easiest
solution is to modify bAddAnchorPoint() so that it accepts both old and
new names. See the attached patch.

--
Regards,
Alexey Kryukov <anagnost at yandex dot ru>

Moscow State University
Historical Faculty

[atype.patch]

--- scripting.orig.c 2009-10-10 14:40:10.000000000 +0400
+++ scripting.c 2009-10-10 15:00:51.000000000 +0400
@@ -6484,15 +6484,15 @@
     sc = GetOneSelChar(c);
     if ( strmatch(c->a.vals[2].u.sval,"mark")==0 )
  type = at_mark;
-    else if ( strmatch(c->a.vals[2].u.sval,"basechar")==0 )
+    else if ( strmatch(c->a.vals[2].u.sval,"basechar")==0 || strmatch(c->a.vals[2].u.sval,"base")==0 )
  type = at_basechar;
-    else if ( strmatch(c->a.vals[2].u.sval,"baselig")==0 )
+    else if ( strmatch(c->a.vals[2].u.sval,"baselig")==0 || strmatch(c->a.vals[2].u.sval,"ligature")==0 )
  type = at_baselig;
     else if ( strmatch(c->a.vals[2].u.sval,"basemark")==0 )
  type = at_basemark;
-    else if ( strmatch(c->a.vals[2].u.sval,"cursentry")==0 )
+    else if ( strmatch(c->a.vals[2].u.sval,"cursentry")==0 || strmatch(c->a.vals[2].u.sval,"entry")==0 )
  type = at_centry;
-    else if ( strmatch(c->a.vals[2].u.sval,"cursexit")==0 )
+    else if ( strmatch(c->a.vals[2].u.sval,"cursexit")==0 || strmatch(c->a.vals[2].u.sval,"exit")==0 )
  type = at_cexit;
     else if ( strmatch(c->a.vals[2].u.sval,"default")==0 ) {
  int val = IsAnchorClassUsed(sc,t);


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fontforge-devel mailing list
Fontforge-devel@...
https://lists.sourceforge.net/lists/listinfo/fontforge-devel