Acidic character and anion stability across periods and groups of the periodic table
There are two factors determining acidity of a compound, the electronegativity factor and the size factor. Down the period, the size factor dominates, and the reason $\ce{HI}$ is more acidic than $\ce{HF}$ is because of this factor, as in the former molecule, the orbitals of iodide participating in bonding are larger and more diffuse, hence bond is weaker.
Across the period, however, size does not vary as significantly as down the group. Hence, we compare using the electronegativity factor. If electronegativity difference is higher, there is larger ionic character, and hence it is easier to deprotonate.
Also, basicity of an ion is proportional to its charge density. So you misunderstood the first concept. You should compare fluoride with hydroxide ion, and not oxide.