textRange.getOpenTypeFeature feature name enumeration

Does anyone know the enumerations for the GetOpenTypeFeature method would be expecting?  I've tried several variations on what shows up in the application but to no avail.  Receive the 'Invalid value specified for parameter Feature' error.  [usage] textRange.GetOpenTypeFeature(feature as string)

Parents
  • You can use the Application.GetSupportedOpenTypeFeatures to get the list of available OpenType Features, its a long list so I will not post the entire list here but you will get something like this:

    aalt
    abvf
    abvm
    abvs
    afrc
    akhn
    blwf
    blwm
    blws
    c2pc
    c2sc
    calt
    case
    ccmp
    cfar
    cjct
    clig
    cpct
    cpsp
    cswh
    curs

    You can then use the Feature string with the GetOpenTypeFeature. So for example, if I wanted to see if the TextRange is using Case-Sensitive Forms you would use "case", here is a simple example:

        If ActiveShape.Text.Story.GetOpenTypeFeature("case") Then
            MsgBox "Case-Sensitive Forms are used"
        Else
            MsgBox "Nope, no Case-Sensitive Forms"
        End If
    

    If you want to set the Feature on or off you can so something like this:

    '    Turn the feature on
        ActiveShape.Text.Story.SetOpenTypeFeature "case", 1
    
    '    Turn the feature off
        ActiveShape.Text.Story.SetOpenTypeFeature "case", 0
    

    Hope that helps, 

    -Shelby

Reply Children
No Data