On a break during a business trip to Washington last year, David Panton hailed a cab to take him to the Capitol. He told the driver he was going to see the Texas senator and presidential candidate Ted Cruz.

“He’s racist,” the cabdriver replied, according to Mr. Panton.

Mr. Panton, taken aback, informed his driver that Mr. Cruz had a bust of the Rev. Dr. Martin Luther King Jr. on the right side of his desk, that he was the only senator to attend the funeral of Nelson Mandela and that he had a “black guy” as a college roommate and best man at his wedding.

“I don’t believe that,” the cabby said, as Mr. Panton tells it.

“Well,” Mr. Panton replied, “you’re talking to him.”

Everyone seems to have an opinion of Mr. Cruz, and usually it is not a good one. He has repeatedly come under attack from Donald J. Trump and other rivals as being eminently unlikable, having antagonized even members of his own party. Hillary Clinton joined that chorus this month when she described Mr. Cruz as a “meanspirited guy.” The New York primary last week, in which he finished a distant third, may have been the low point in his decades-long struggle with popularity.