My only bear encounter while hiking was when I was about 21 years old. I was doing a day hike on the Appalachian Trail in Shenandoah National Park in Virginia. I had moving quietly, hoping to see some deer or other wildlife. I heard something a little ahead of me, so I stopped and looked to see what made the noise. To my surprise, all I saw was a large black furry back, the rest of the animal concealed by some bushes off to one side of the trail, maybe 20 feet away. "BEAR!", I realized. He had not seen or heard me, and was evidently eating some berries or something. I thought for a few seconds about what I should do. Go back from where I came and choose another route? Or continue forward, quietly, since the trail got no closer to the bear. I chose the latter. I had only taken about 2 steps when the bear either heard or smelled me. He raised his head and looked straight at me! GULP! But then, the unexpected happened. In less than a second, the bear jumped up, rotated, and ran off in the opposite direction from me. I was really relieved and continued my hike, shaken but not stopped, and sure that would be my only bear encounter of the day.
A couple of hours later, on the same hike, I came into a small clearing and saw a large metal cylinder with an open gate at one end and a closed gate at the other. At first, I didn't know what I was looking at. Then it hit me! A bear trap, set out by the park rangers! Then I realized, where there was a trap, there was likely another bear. I wasted no time getting out of there, my confidence about not seeing another bear shaken. (But I finished my hike maybe an hour later and didn't see another one.)
Maybe I was lucky that day. But it is a memory that will stick with me forever.
Regarding using an airhorn to frighten off the bears, have you considered instead getting some bells (like Christmas jingle bells) and attaching them to your boots? When I visited Denali National Park several years ago, that's what the rangers recommended if you were going to hike in the backcountry there. The bells would be much lighter and would alert the bears to your presence long before you get close, thereby avoiding an encounter.
"Wildness is a necessity." -- John Muir
"When you go to hide a geocache, think of the reason you are bringing people to that spot. If the only reason is for the geocache, then find a better spot." – briansnat