Jump to content

Styling individual results of ScriptFilter


Recommended Posts

The powerful mechanism of the Script Filter allows for the specification of the title, subtitle, and icon. Is it possible to style it beyond this?

 

For instance, can the title text be styled with different fonts, bolding, etc? Can the background color be specialized for a single result?

 

I am writing up a description of a new workflow for Tinderbox, but in the meanwhile, I can mention one component now: for a Tinderbox note, the query in the Alfred query box is text-matched to a list of fonts, allowing the user to change the font for that TB note. When a partial font name has been typed, many fonts may match. I show the names right now, but would certainly prefer to render the name using that particular font, if that is at all possible.

 

Thanks!

  Abhijit

Link to comment
1 hour ago, amahabal said:

Do you know if there are any plans to add such support? (I don't know if you work for Alfred)

 

I don't work for Alfred, but I'd be surprised if such a feature were added. Performance is a very high priority, and I'm not sure that the Macs that Alfred is currently being used on are all fast enough to handle individually-styled results without a noticeable slowdown.

 

I think for the time being, we only have Unicode (including emoji) to work with in that regard.

 

If it's fonts you're after displaying, you can generate an icon for an item that show a particular font and—as @dfay says—use the Largetype to show a full preview.

 

Here’s some code from one of my workflows for generating icons from text if that’s any help.

Link to comment

I will give that a shot.

 

Regarding performance: I am sure it can be done in a way that those workflows that don't use this feature pay little penalty. On the other hand, I suppose, everyone will start using the shiny  features if they are there, and adding the feature is thus dangerous. On the third hand, if everybody uses the feature, it must be a useful feature and thus worth adding.

 

 

Link to comment
2 minutes ago, amahabal said:

On the other hand, I suppose, everyone will start using the shiny  features if they are there, and adding the feature is thus dangerous.

 

This. Foot-guns are a big no-no. Features are generally measured against what would happen if they were used with reckless abandon rather than with sound judgement and great care.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...