public Glyph [] add_glyphs (GlyphRequest [] glyph_reqs) {
    // Determine length.
    int numGlyphs = glyph_reqs.length;
    int imageBytes = 0;
    for (int i = 0; i < numGlyphs; i++) {
      imageBytes += glyph_reqs [i].get_image ().length;
    }
    imageBytes += RequestOutputStream.pad (imageBytes);
    int len = numGlyphs * 4 + imageBytes / 4 + 3;
    RequestOutputStream o = display.out;
    Glyph [] glyphs = new Glyph [numGlyphs];
    synchronized (o) {
      o.begin_request (render.major_opcode, 20, len);
      o.write_int32 (id);
      o.write_int32 (numGlyphs);
      for (int i = 0; i < numGlyphs; i++) {
        int id = glyph_reqs [i].get_id ();
        o.write_int32 (id);
        glyphs [i] = new Glyph (this, id);
      }
      for (int i = 0; i < numGlyphs; i++) {
        GlyphRequest gr = glyph_reqs [i];
        o.write_int16 (gr.get_width ());
        o.write_int16 (gr.get_height ());
        o.write_int16 (gr.get_x ());
        o.write_int16 (gr.get_y ());
        o.write_int16 (gr.get_offs_x ());
        o.write_int16 (gr.get_offs_y ());
      }
      for (int i = 0; i < numGlyphs; i++) {
        byte [] image = glyph_reqs [i].get_image ();
        o.write (image);
      }
      o.send ();
    }
    return glyphs;
  }