From d76fc6f518606def8ddc52e0cd4d8a29bd2536fc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 8 Mar 2023 05:39:56 +0100 Subject: Graph: Font: Add equals() + hash() API doc; GraphUI's Label*.setText(): Only modify values if text and/or font differs, skipping markShapeDirty() saves performance. --- src/jogl/classes/com/jogamp/graph/font/Font.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/jogl/classes/com/jogamp') diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java index f296c77b3..1b5452a45 100644 --- a/src/jogl/classes/com/jogamp/graph/font/Font.java +++ b/src/jogl/classes/com/jogamp/graph/font/Font.java @@ -255,6 +255,24 @@ public interface Font { StringBuilder getAllNames(final StringBuilder string, final String separator); + /** + * Returns the hash code based on {@link #NAME_UNIQUNAME}. + *

+ * {@inheritDoc} + *

+ */ + @Override + int hashCode(); + + /** + * Returns true if other instance is of same type and {@link #NAME_UNIQUNAME} is equal. + *

+ * {@inheritDoc} + *

+ */ + @Override + boolean equals(final Object o); + /** * Return advance-width of given glyphID in font-units, sourced from `hmtx` table. * @param glyphID -- cgit v1.2.3