To position an object independent from the screen resolution you have to place it inside a range from 0 to 1 and multiply it by the current screen resolution.

For example, to place the upper left corner of a text at the center of the screen you would do:

pos_x = 0.5 * screen_size.x;
pos_y = 0.5 * screen_size.y;

To cut off decimals you also need to use integer:

pos_x = integer (0.5 * screen_size.x);
pos_y = integer (0.5 * screen_size.y);

I think you need to create a new font for each resolution and change it with the old font after the resolution was changed.