Graphics

 View Only
  • 1.  Font Usage

    Posted 11-02-2015 20:36
    Is there a way to see where a font is used in a package? I've got a couple errant fonts that I need to delete, but they are used somewhere in my package. I've combed through it a couple times, and perhaps have just missed it, but I was hoping there was an easy way to see which scenes utilized which fonts.


  • 2.  RE: Font Usage

    Posted 11-13-2015 16:13
    I'm assuming from the lack of replies that no one knows if this can be done, or that it cannot. I've run through every scene and every text object very diligently, but still have two fonts that won't allow me to delete them because they're "used" somewhere, but nothing is. Thoughts?

    #XPression


  • 3.  RE: Font Usage

    Posted 11-16-2015 20:24
    Hi Dan,

    If you send me a private link with your project I might have some ways to find them..

    #XPression


  • 4.  RE: Font Usage

    Posted 11-17-2015 11:16
    In your project, create a new scene, with a textObject "Text1".

    Under Script Editor > OnOnline :

    Dim MyScene As xpScene = Nothing

    Dim MyFont As xpFont = Nothing

    Dim MyXpBaseObject As xpBaseObject = Nothing

    Dim MyXpTextObject As xpTextObject = Nothing

    Dim MyDebugOutput As String = ""

    Dim i, j as integer

    Dim item as string

    Dim MyList(0) As String

    for i = 0 To Engine.SceneCount - 1

    Engine.GetScene(i, MyScene)

    For j = 0 To MyScene.ObjectCount - 1

    MyScene.GetObject(j, MyXpBaseObject)

    If MyXpBaseObject.TypeName = "Text" Then

    MyXpTextObject = CType(MyXpBaseObject, xpTextObject)

    MyList(MyList.Length - 1) = MyXpTextObject.CurrentFont.Name & " > " & MyScene.Name & " > " & MyXpBaseObject.Name

    ReDim Preserve MyList(MyList.Length)

    End If

    Next

    Next

    ReDim Preserve MyList(UBound(MyList) - 1)

    Array.Sort(MyList)

    For Each item In MyList

    MyDebugOutput += item.ToString & vbNewLine

    Next

    Self.GetObjectByName("Text1", MyXpTextObject)

    MyXpTextObject.text = MyDebugOutput



    Then, put it on air !

    If you have many text object, you can animate this text object to scroll down (or use a smaller font)

    #XPression


  • 5.  RE: Font Usage

    Posted 11-17-2015 15:07
    Vincent:

    Did that, now what am I looking at? It appears to be a list of all text objects I have in every scene?

    #XPression


  • 6.  RE: Font Usage

    Posted 11-17-2015 15:08
    Nevermind, read a little closer. It goes:

    FONT > SCENE > OBJECT

    correct?

    #XPression


  • 7.  RE: Font Usage

    Posted 11-17-2015 19:21
    Yes !
    ..........
    #XPression