• Alexandre Adolphe's avatar
    Allow negative line width for :box face attribute · 34ae2d0c
    Alexandre Adolphe authored
    Separate values for box line width and height and allow both to be
    negative which makes the visual width and height of the boxed string
    unchanged (Bug#13011).
    
    * doc/lispref/display.texi (Face Attributes): Modify :box attribute
    description to reflect the new possibilities.
    * lisp/cus-face.el (custom-face-attributes): Set box attribute to get
    two integer to set vertical and horizontal width and modify pre-filter
    to accept dotted list of two int as valid box attribute.
    * src/dispextern.h (face): Use two int for box horizontal and vertical
    line width.
    
    * src/nsfont.m (nsfont_draw): Use new face attributes.
    * src/nsterm.m (ns_draw_box, ns_draw_relief): Support separated
    horizontal and vertical box line width.
    (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
    (ns_dumpglyphs_image, ns_draw_glyph_string_foreground)
    (ns_draw_composite_glyph_string_foreground): Use new face attributes.
    
    * src/w32term.c (w32_draw_box_rect, w32_draw_relief_rect): Support
    separated horizontal and vertical box line width.
    (x_draw_glyph_string_background, x_draw_glyph_string_foreground)
    (x_draw_composite_glyph_string_foreground)
    (x_draw_glyphless_glyph_string_foreground, x_draw_glyph_string_box)
    (x_draw_image_foreground, x_draw_image_relief)
    (w32_draw_image_foreground_1, x_draw_image_glyph_string): Use new face
    attributes.
    
    * src/xfaces.c (Sinternal_set_lisp_face_attribute, realize_x_face):
    Accept box attribute as a list of two ints.
    
    * src/xdisp.c (estimate_mode_line_height, produce_image_glyph)
    (produce_xwidget_glyph, x_produce_glyphs): Use new face attributes.
    * src/xterm.c (x_draw_box_rect, x_draw_relief_rect): Support separated
    horizontal and vertical box line width.
    (x_draw_glyph_string_background, x_draw_glyph_string_foreground)
    (x_draw_composite_glyph_string_foreground)
    (x_draw_glyphless_glyph_string_foreground, x_draw_glyph_string_box)
    (x_draw_image_foreground, x_draw_image_relief, x_draw_image_foreground_1)
    (x_draw_image_glyph_string): Use new face attributes.
    34ae2d0c