Skip to content

Commit 082ca11

Browse files
committed
[lib] Wrote documentation of script to open type tag
1 parent 90f6319 commit 082ca11

File tree

1 file changed

+19
-0
lines changed
  • tehreer-android/src/main/java/com/mta/tehreer/unicode

1 file changed

+19
-0
lines changed

tehreer-android/src/main/java/com/mta/tehreer/unicode/Script.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,25 @@ public final class Script {
772772
private Script() {
773773
}
774774

775+
/**
776+
* Returns the OpenType tag of specified script as an integer in big endian byte order. The
777+
* association between Unicode Script property and OpenType script tags is taken from the
778+
* specification:
779+
* <a href="https://docs.microsoft.com/en-us/typography/opentype/spec/scripttags">
780+
* https://docs.microsoft.com/en-us/typography/opentype/spec/scripttags
781+
* </a>.
782+
*
783+
* If more than one tag is associated with a script, then the latest one is returned. For
784+
* example, Devanagari script has two tags, `deva` and `dev2`. So in this case, `dev2` will be
785+
* returned.
786+
*
787+
* If no tag is associated with a script, then `DFLT` is returned.
788+
*
789+
* @param script
790+
* The script whose OpenType tag is returned.
791+
* @return
792+
* The OpenType tag of specified script as an integer in big endian byte order.
793+
*/
775794
public static int getOpenTypeTag(int script) {
776795
return Unicode.getScriptOpenTypeTag(script);
777796
}

0 commit comments

Comments
 (0)