public static int convertPxToSp(int pxSize){
  return Math.round((float)pxSize * getDisplayDensity4Fonts());
}

public static int convertPxToSp ( int pxSize ) { return Math . round ( ( float ) pxSize * getDisplayDensity4Fonts ( ) ) ; }
convert absolute pixels to scale dependent pixels . this scales the size by scale dependent screen density ( accessibility setting ) and the global display setting for message composition fields
