Font defaultFont () { return Font.cocoa_new (display, defaultNSFont ()); }
Font defaultFont () { if (display.smallFonts) return display.getSystemFont (); return Font.cocoa_new (display, defaultNSFont ()); }
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); double /*float*/ width = 0, height = 0; String string = Double.toString (buttonView.maxValue ()); Font font = Font.cocoa_new(display, textView.font ()); NSAttributedString str = parent.createString(string, font, null, 0, false, true, false); NSSize size = str.size (); str.release (); width = (float)/*64*/size.width; height = (float)/*64*/size.height; if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; Rectangle trim = computeTrim (0, 0, (int)Math.ceil (width), (int)Math.ceil (height)); if (hHint == SWT.DEFAULT) { size = buttonView.cell ().cellSize (); trim.height = Math.max (trim.height, (int)size.height); } return new Point (trim.width, trim.height); } public Rectangle computeTrim (int x, int y, int width, int height) {
NSTableHeaderCell headerCell = nsColumn.headerCell (); if (displayText != null) { Font font = Font.cocoa_new(display, headerCell.font ()); attrString = parent.createString(displayText, font, null, SWT.LEFT, false, (parent.state & DISABLED) == 0, false); stringSize = attrString.size ();
NSTableHeaderCell headerCell = nsColumn.headerCell (); if (displayText != null) { Font font = Font.cocoa_new(display, headerCell.font ()); attrString = parent.createString(displayText, font, null, SWT.LEFT, false, (parent.state & DISABLED) == 0, false); stringSize = attrString.size ();
NSFont font = NSFont.systemFontOfSize(systemFontSize * dpi.y / screenDPI.y); font.retain(); systemFont = Font.cocoa_new(this, font);
NSFont nsFont = panel.panelConvertFont(font.handle); if (nsFont != null) { fontData = Font.cocoa_new(display, nsFont).getFontData()[0];
NSFont font = new NSFont (attribs.objectForKey (key)); font.retain(); style.font = Font.cocoa_new (display, font);