The filename extension used by Finder icon is too large. Is it a bug?

The icons of my lua files appear somewhat different from txt, js, sh and others.

All the three file types are associated with the same app (currently, it is CotEditor, but I’ve also tried BBEdit and Sublime Text), and all the three file types are recognized by Finder (text, Lua script and JavaScript if using the List view). But the word lua is for some reason larger than TXT and JS, and have a period. Is it a bug? Does anybody have the same issue?

enter image description here

Why do you think this is a bug? Icons are (partiality) determined by apps. They can be anything.

I think this is a bug because all the three file types are associated with the same app, and all the three file types are recognized by Finder (text, Lua script and JavaScript if using the List view). But the word lua is for some reason larger than TXT and JS, and have a period. Why?

Does anybody have the same issue?

Just curious. Why does this matter to you?

1 Like

Just curious: Why does it matter?

The TXT and JS icons represent a certain style. Lua is understood but it is a fairly “rare” file type and whoever decided to make an icon for it used a different style of text. I doubt that Apple itself made the icon for this file type. If you wrote an application and created a file type, you would be responsible for creating its icon if you wanted to bother. You could, if you wished, have .kyk as your file type and then use KYK in the icon you designed in the font used for TXT and JS. But that is not required. You might just have a picture of a kayak.
CleanShot 2024-03-30 at 05.38.43@2x
CleanShot 2024-03-30 at 05.45.08@2x
CleanShot 2024-03-30 at 05.43.30@2x
CleanShot 2024-03-30 at 05.44.39@2x

Some icons have no text on them but somebody still went to the effort of making some kind of graphic for it.

There are hundreds of file extensions that are in use by various applications. When you use an app like BBEit, it is capable of opening may of these file types - particularly if it looks inside and finds some text.

It is not a bug because there is not a rule that determines how the icon looks. The icon “picture” is not created “on the fly” using some algorithm that takes the extension and shows it in the bottom of the icon with a certain font and text color.

4 Likes

Many thanks. So it seems you mean that txt and js icons are provided by macOS whereas Lua icon is provided by another app, right?

It seems I can test it myself by changing association of Lua files to TextEdit, the default macOS text editor. (I’m not at home currently.) But because I’ve already tried to associate Lua files with three different text editors and the icon is always the same nevertheless, I’m not sure this will fix the issue.

Do you have the same appearance of those three icons on your Mac?

I’m curious about this, too. I used touch to make an empty lua file and saw the same icon. But then I edited the file and it switched to the font size used on TXT, CFG, PYTHON, etc. and no new lua files have the old icon. I tried searching through app packages for Lua references but couldn’t find an icon.

Link from Apple explains how to make an icon. They describe how to make a “standard” appearing icon for a document. There is a lot of flexibility even within their guidelines. Whoever designed the Lua icon did not even bother to conform to the Apple guidelines.

1 Like