Portia is trapped by her father's will in The Merchant of Venice by William Shakespeare. If she wants her inheritance, she must abide by the conditions of his will in seeking a husband. Her father left three boxes ("caskets") from which each suitor might choose: the gold one, the silver one, or the lead one. Portia's portrait is in one of the boxes, and the suitor who chooses the correct one wins her hand in marriage.
A Moorish prince is the first suitor to appear in Act II scene i, and he asks Portia not to discount him as a suitor because he has dark skin. Portia's response is as follows:
In terms of choice I am not solely led
By nice direction of a maiden's eyes;
Besides, the lottery of my destiny
Bars me the right of voluntary choosing:
But if my father had not scanted me
And hedg'd me by his wit, to yield myself
His wife who wins me by that means I told you,
Yourself, renowned prince, then stood as fair
As any comer I have look'd on yet
For my affection.
Roughly translated, Portia tells the prince that she is not one of those women who does not love someone based solely on his looks; in addition, she is not allowed, like most other young women, the freedom to choose whom she will marry. But, if her father had not created this game and bound her to give herself to the suitor who chooses the correct box, she would consider the prince as handsome as any other suitor who has come to seek her hand.
Specifically, then, "But if my father had not scanted me,/And hedged me by his wit, to yield myself" refers to her father's "witty" idea to force her to marry the man who opens the correct casket.