revFontLoad issue: odd spacing

Roger Eller roger.e.eller at sealedair.com
Fri Sep 18 10:31:40 EDT 2015


Someone recommended that I switch to the start using font syntax.  It has
helped, but is still not perfect.  I have found that if the alignment is
off, reloading the font again snaps it into place, so I keep a button
onscreen to refresh the fonts.

on LoadMyFonts
   set the itemDel to "/"
   put item 1 to -2 of the effective filename of this stack &
"/Resources/TrajanPro" into tPath
   put tPath & "/TrajanPro-Regular.otf" into tReg
   put tPath & "/TrajanPro-Bold.otf" into tBold
   start using font file tReg
   start using font file tBold
end LoadMyFonts

~Roger


On Fri, Sep 18, 2015 at 10:16 AM, Curtis Ford <curt at sonasoftware.com> wrote:

> I'm running into an issue with revFontLoad on Windows 10 (Livecode 7.0.5).
> The first time I open the standalone, the font seems to load OK - text is
> clearly displaying in the custom font - but it looks like there's 4 or 5
> spaces between each word. If I close the standalone and open it a second
> time, text displays properly, with no spacing issues, in the correct font.
> (I'm not using revFontUnload.)
>
> In preOpenStack I have a loadTheFonts handler, and farther down in the
> stack script I have
>
> on loadTheFonts
>
>    put "CharisSILB.ttf,CharisSILBI.ttf,CharisSILI.ttf,CharisSILR.ttf" into
> theFonts
>
>    repeat with i = 1 to 4
>       if (item i of theFonts is in the fontNames) is false then
>          set the itemDelimiter to "/"
>          put item 1 to -2 of the filename of this stack into tLocation
>          set the itemDelimiter to comma
>          put "/Fonts/" after tLocation
>          put item i of theFonts after tLocation
>          if there is a file tLocation then
>             revFontLoad tLocation
>          else
>             answer "The font file" && item i of theFonts && "was not
> found."
>          end if
>       end if
>    end repeat
> end loadTheFonts
>
> Any ideas? Should I be calling revFontLoad in some other way?
>
> thanks,
>
> Curt
> --
> Sent from Postbox <
> https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list