A president who built his brand on winning is discovering that in court, at least, the scoreboard tells a different story.