Check-in [f6d423a9ba]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add isValid() method to SQFFont; Add note in changelog about fixed empty strings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f6d423a9ba18d4beb664ae56bb2d5870e6c53ad0
User & Date: stephanie.gawroriski 2019-06-16 04:45:46
Context
2019-06-16
04:47
Actually set the monospace font! check-in: 93241bdf3f user: stephanie.gawroriski tags: trunk
04:45
Add isValid() method to SQFFont; Add note in changelog about fixed empty strings. check-in: f6d423a9ba user: stephanie.gawroriski tags: trunk
04:40
P4 PBM is packed in binary and is not in pixel bits, so write the file correctly. check-in: 1ff2b8e880 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to changelog.mkd.

    94     94        * Corrected mapping of characters since SQFs are ISO-8859-1 and most games
    95     95          may be ISO-8859-1, since some characters may be missing in the font
    96     96          use similar graphics for them.
    97     97        * Fully added `cc.squirreljme.runtime.lcdui.gfx.SerializedGraphics`, This
    98     98          allows all of the graphics drawing functions to be forwarded when
    99     99          graphics acceleration is used, previously only a subset of methods were
   100    100          implemented.
          101  +     * Fixed crash in text drawing when an empty string is drawn.
   101    102        * Fully drawn default fonts.
   102    103        * Made all the graphics operations not throw a `TODO`, instead they will
   103    104          just draw a placeholder graphic.
   104    105        * Moved the graphics drawing operations to another class.
   105    106        * Removed the 24 strike font, it was too large.
   106    107        * Update the `Display` when a command is added or removed.
   107    108        * Use a default title for a `Displayable` if one has not been set, this

Changes to runt/apis/midp-lcdui/cc/squirreljme/runtime/lcdui/font/SQFFont.java.

   138    138   	public final int charWidth(char __c)
   139    139   	{
   140    140   		byte[] charwidths = this._charwidths;
   141    141   		if (__c > 256 || !this._isvalidchar[__c])
   142    142   			return charwidths[0];
   143    143   		return charwidths[__c];
   144    144   	}
          145  +	
          146  +	/**
          147  +	 * Is the specified character valid?
          148  +	 *
          149  +	 * @param __c The character to check.
          150  +	 * @return If the character is valid.
          151  +	 * @since 2019/06/16
          152  +	 */
          153  +	public final boolean isValid(char __c)
          154  +	{
          155  +		if (__c > 256)
          156  +			return false;
          157  +		return this._isvalidchar[__c];
          158  +	}
   145    159   	
   146    160   	/**
   147    161   	 * Loads the bitmap
   148    162   	 *
   149    163   	 * @param __c The character to get.
   150    164   	 * @param __bmp The output bitmap.
   151    165   	 * @return The bytes per scanline.