No.
Actually, you can teleport while barely away from the ledge and sweetspot it.
The ledge will actually decrease your FW length and help you sweetspot.
I'm sure that can be done in any direction excluding complete vertical distances.
In those cases, yes, you'll need to know the exact length.
Actually, it's rather interesting. Hippy is completely right, but I'd like to add to that a little.
The ledge will indeed stop your distance if you sweetspot it, but there was a tiny thing in Melee that I think may have been caried over in Brawl. I'll go over it. If you're close to the ledge and you teleport towards it, there are three zones.
1) Head-to-torso: Zelda should sweetspot the ledge and grab immediately. Yay.
2) Waist-lower leg: Depending on the angle you teleported, Zelda will either grab the ledge a fraction of a second later than normal, she'll grab the ledge almost a full second later than normal, of if you teleported downwards she won't grab it at all (>.<).
3) Feet: This is what my post is actually about. You see, if you teleported Northwest/Northeast in Melee and were kind of close to the ledge (not incredibly close, but not full FW teleport distance), and landed in this zone, you wouldn't bypass the ledge like you physically should. Zelda will stop and land on the stage floor, right next to the ledge. It's like she gets caught there or something.
At any rate, I never bothered to fully research and experiment with this, but it has happened to me in Brawl as well. I do know that if you are very close to the ledge though (like, a bit less than half of FW teleporting distance), Zelda will not get caught by the ledge and she'll go flying past it, reappearing above the stage floor going the full Northeast/Northwest teleport distance.
Another interesting tidbit is that this also applies while teleporting Southeast/Southwest
off the stage (at least it does in Brawl; it hasn't happened to me in Melee). If you try it, sometimes Zelda will stop at the ledge when you try to teleport down it, reappear just off the ledge, and fall, not going the full teleport distance.
It didn't occur to me while I was teleporting off of a grabable ledge though, so I don't know if you could hug the ledge to save yourself or not (this happened to me while I was messing around in Skyworld or whatever Pit's stage's name is). All I know is that there would be no point in trying to do this in Melee, because you can't grab the ledge when facing away from it. However, doing this seemed to stop Brawl Zelda's arial momentum somewhat, so there might be enough time for her to grab the ledge when she's done spinning.
I haven't been able to replicate this yet (not that I've exactly tried for long periods of time or anything). If anyone can confirm this, let me know please.
So yeah, just though I should point that out.