An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Font Book opens instead of TextEdit?
#24958 02/06/13 11:11 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
This seems like the appropriate forum, but your judgement, Mods.

I d/l'ed WaterRoof for a look-see (reason irrelevant here) and stumbled on behavior I've never before run across, and I'm wondering whether anybody has got an insight.

I was poking around in WR's package contents and found ~/Desktop/WaterRoof.app/Contents/Resources/removedonate, which, as its name suggests, enables you to remove the donation solicitation from WR's main pane, but here's what I also found:
  1. Noting that the file hasn't got a suffix, I did a command-I and found that it opens by default in TextEdit.
  2. Double-clicking opened the file in TE, and I changed its contents, i.e. "false," to "true," quit TE, and saved my changes.
  3. As expected, the donation solicitation was gone the next time I launched WR.
  4. I'm not even certain why, but I navigated back to the file, double-clicked on it, and...Font Book opened.
  5. Nothing I'm aware of was different - still no file suffix, TE still default "Open with" - other than what happened when I double-clicked on the file. (Dragging it to TE's Dock icon still opens it in TE.)
  6. I was able to duplicate the anomalous behavior with a fresh d/l.
Anybody?


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: Font Book opens instead of TextEdit?
artie505 #24963 02/07/13 12:05 AM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3
It's interesting that saving the document with any content other than "true" causes it to open in TextEdit when double-clicked. "True", "tru", even " true" [with a preceding space] all respond to the double-click by opening TextEdit.

Actually, to be more precise, if the first four characters of the document are lowercase t, r, u, and e, then double-clicking will open Font Book, regardless of what follows. So "true false" and "true Grit is a 1968 serialized novel by American author Charles Portis" both result in the Font Book response.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Font Book opens instead of TextEdit?
dkmarsh #24964 02/07/13 04:05 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
Good research instincts (as always)!

I wonder what it's all about? (The doc is typed in Helvetica 13, but my experience has been that, varying from d/l to d/l, Font Book opens to either Bell MT Regular or Abadi MT Condensed Extra Bold Regular... I dunno. confused )


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: Font Book opens instead of TextEdit?
artie505 #24966 02/07/13 11:15 AM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

Quote:
The doc is typed in Helvetica 13...

The document opens in Monaco 11 for me, which is what I've got set as TextEdit's Plain text font. Yours is no doubt set to Helvetica 13. As for Font Book, it opens to whatever font was selected the last time it was open (in my case, that's "No fonts selected"). Double-clicking removedonate doesn't really open the document in Font Book; it simply launches Font Book.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Font Book opens instead of TextEdit?
dkmarsh #24972 02/07/13 10:01 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
You're correct about my TextEdit default font being Helvetica 13, but I'm getting different results than you are from Font Book.

Example: I changed my TE default to Marker Felt Thin, and the file opened in TE in that font, but after I changed "false" to "true," Font Book opened to Bauhaus 93 Regular (which had never come up before).

I can kind of understand Abadi... coming up, because it's first in alpha order in "All Fonts," but I've never used either Bauhaus... or Bell... (or, for that matter, Abadi...), I don't recall ever looking at them, and they're not even acting consistently.

I was hoping that one of our resident developers might be able to kick in with an insight.

> (in my case, that's "No fonts selected")

In my Font Book 2.2.2, the first font in alpha order in each collection is selected by default.

> Double-clicking removedonate doesn't really open the document in Font Book....

I'm not sure why you included that, since neither of us has said otherwise.


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: Font Book opens instead of TextEdit?
dkmarsh #24974 02/07/13 10:24 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Originally Posted By: dkmarsh
It's interesting that saving the document with any content other than "true" causes it to open in TextEdit when double-clicked. "True", "tru", even " true" [with a preceding space] all respond to the double-click by opening TextEdit.

Actually, to be more precise, if the first four characters of the document are lowercase t, r, u, and e, then double-clicking will open Font Book, regardless of what follows. So "true false" and "true Grit is a 1968 serialized novel by American author Charles Portis" both result in the Font Book response.


Aha! Unix has traditionally not used filename extensions to determine the type of a file. Instead, the system looks for a "magic word" at or near the beginning of the file. For example, compiled executable binaries often start with FACF FEED or FECE BEBA, depending on the object file format. A file with its executable bit set and beginning with "#!" is a shell script. A file that begins with "<?xml" (possibly preceded by a byte-order mark) is an XML file. A binary property list always begins with "bplist". And so forth.

The file command will tell you what kind of file the system thinks its argument is. See man file for details.

I'm guessing that "true" at the beginning of the file is the "magic word" for a TrueType font file.

If I enter

echo true blood > ~/Desktop/truth
file ~/Desktop/truth

I learn that file considers it "ASCII text". Get Info in Finder calls it a "Document". It's probably Launch Services that sees "true" as indicative of a TrueType file. Double-clicking it does indeed launch Font Book on my system too.

Re: Font Book opens instead of TextEdit?
ganbustein #24975 02/07/13 11:06 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
Great post!!!

Thanks. smile


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: Font Book opens instead of TextEdit?
ganbustein #25006 02/13/13 04:48 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Originally Posted By: ganbustein
The file command will tell you what kind of file the system thinks its argument is. See man file for details.


woo I wasn't aware of that, noted!

$ file /Applications/Address\ Book.app
/Applications/Address Book.app: directory


bummer. it's not too bright though. Most docucments are type "data" also. I was hoping it could tell me which files were old clarisworks.


I work for the Department of Redundancy Department
Re: Font Book opens instead of TextEdit?
Virtual1 #25011 02/13/13 06:16 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

How about

mdfind 'kMDItemFSName'=='*.cwk'

?



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Font Book opens instead of TextEdit?
dkmarsh #25041 02/15/13 10:33 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Originally Posted By: dkmarsh

How about

mdfind 'kMDItemFSName'=='*.cwk'

?


Does that work if the files have no extensions?


I work for the Department of Redundancy Department

Moderated by  alternaut, dianne, dkmarsh 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.027s Queries: 34 (0.020s) Memory: 0.6221 MB (Peak: 0.7111 MB) Data Comp: Zlib Server Time: 2024-04-26 13:03:18 UTC
Valid HTML 5 and Valid CSS