Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ╔══════════════════════════════════════════════════════╤═══════╤════════════╗
- # ║ Victor Engine SFont 1.01 Add-On: Custom Spacing │ v1.00 │ (12/25/13) ║
- # ╠══════════════════════════════════════════════════════╧═══════╧════════════╣
- # ║ Author : William Couillard ║
- # ║ E-Mail : cooliebk18@yahoo.com ║
- # ║ Website : http://ffdiscovery.wikia.com ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ABOUT ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script allows the user to change the number of pixels used as space ║
- # ║ between each letter when using Victor Engine - SFonts 1.01. By default, ║
- # ║ the original script forces 12 pixels of space, which may be too few or ║
- # ║ too many, depending on the SFont files used. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ TERMS OF USE ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ► Do not edit the script's header or comments. ║
- # ║ ► Free to use in commercial projects as long as proper credit is given to ║
- # ║ ALL the names in the above header. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ CHANGE LOG ║
- # ╠═════════════════════════════════════════════════════════════════╤═════════╣
- # ║ ■ December 25, 2013 : Initial release. │ (v1.00) ║
- # ╠═════════════════════════════════════════════════════════════════╧═════════╣
- # ║ OVERWRITTEN METHODS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script overwrites a method in Victor Engine - SFonts 1.01. ║
- # ╟───────────────────────────────────────────────────────────────────────────╢
- # ║ ■ class SFont ║
- # ║ ► def initialize ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ INSTRUCTIONS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ Paste this script directly UNDERNEATH Victor Engine - SFonts 1.01 script. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ IMPORT SETTING ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- module Victor_Engine
- # ╔════════════════════════════════════════════════════╗
- VE_SFONT_SPACING = 6 # ║ Set the number of pixels between each letter here. ║
- # ╚════════════════════════════════════════════════════╝
- end
- #==============================================================================
- # ** SFont
- #------------------------------------------------------------------------------
- # This class handles the SFonts
- #==============================================================================
- class SFont
- #--------------------------------------------------------------------------
- # * initialize
- #--------------------------------------------------------------------------
- def initialize(name)
- @bitmap = Cache.sfont(name)
- @height = @bitmap.height + 4
- @skip = @bitmap.get_pixel(0, 0)
- @digits = VE_SFONT_DIGITS
- @alpha = 255
- @values = {}
- @values[" "] = Rect.new(-12, 0, VE_SFONT_SPACING, @height)
- setup_digits
- @values.default = @values[" "]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement