I'm trying to identify a fantasy fiction (possibly epic fantasy) book I read several years ago, although I'm sure it was out well before then. It may or may not be in a series, but it was a decently thick hardcover book I found in the adult section of my local library. The book was set in medieval times (there were castles and a lord's solar), and the main character is able to perform magic by closing his eyes and concentrating on emptying his mind, kind of like a blackboard, and then mentally writing out the spells or symbols. I think he learns to do this during the book.
I seem to recall part of the plot being an effort to try to free somebody (a woman, perhaps) from an enemy's castle, but I'm not completely sure about that. I do remember the characters ride horses and fight with swords and there were also archers at some point: It's not just magic. I realize this is pretty vague.