+/* Return the pixel width/height of frame F with a text size of
+ width/height. */
+
+#define FRAME_TEXT_TO_PIXEL_WIDTH(f, width) \
+ ((width) \
+ + FRAME_SCROLL_BAR_AREA_WIDTH (f) \
+ + FRAME_TOTAL_FRINGE_WIDTH (f) \
+ + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+
+#define FRAME_TEXT_TO_PIXEL_HEIGHT(f, height) \
+ ((height) + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+
+/* Return the text width/height of frame F with a pixel size of
+ width/height. */
+
+#define FRAME_PIXEL_TO_TEXT_WIDTH(f, width) \
+ ((width) \
+ - FRAME_SCROLL_BAR_AREA_WIDTH (f) \
+ - FRAME_TOTAL_FRINGE_WIDTH (f) \
+ - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+
+#define FRAME_PIXEL_TO_TEXT_HEIGHT(f, height) \
+ ((height) - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+
+/* Value is the smallest width of any character in any font on frame F. */
+
+#define FRAME_SMALLEST_CHAR_WIDTH(f) \
+ FRAME_DISPLAY_INFO (f)->smallest_char_width
+
+/* Value is the smallest height of any font on frame F. */
+
+#define FRAME_SMALLEST_FONT_HEIGHT(f) \
+ FRAME_DISPLAY_INFO (f)->smallest_font_height