RPGXP 스크립트
2016.07.22 23:02

Font Setup

조회 수 1641 추천 수 0 댓글 0
Atachment
첨부 '3'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

FONT.PNG

Font Setup

 다운로드

https://drive.google.com/file/d/0B-cKNhJz3SPESW1mZHZqNGJlVUk/view?usp=sharing

 

 설명

폰트가 없을 시 메세지창이 뜨면서 게임이 종료됩니다.

LIST에 해당 폰트에 이름이랑 .ttf파일이 있으면 (암호화 상태에서도)

Fonts폴더가 생성되고 그 안에 폰트 .ttf파일이 생성됩니다.

+

네코 플레이어에서도

폰트 적용이 가능합니다.

 

 사용법

Font.setup

 

 추가하는법

Datas/Fonts폴더 안에 폰트 이름.ttf 파일을 넣고

  LIST 해시 변수 사이에

  

  "폰트 이름" => "Fonts/폰트 이름.ttf", 

  

  으로 폰트를 추가할 수있습니다.

 

 사진

0.PNG

1.png

 동영상

http://blog.naver.com/unjong_/220769185578

 

 갱신 날짜

2016.07.22 오후 10:20

 

 스크립트

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

#==============================================================================

# ** Font

#------------------------------------------------------------------------------

# * Auhor => UNJONG (unjong_@naver.com)

# * Dat => 2016.07.22

# * Syntax => Ruby 1.8.1 (RMXP)

#==============================================================================

 

class Font

  

  # 디폴트 이름

  @@default_name = "맑은 고딕"

  

  # 디폴트 크기

  @@default_size = 24

  

  # 디폴트 볼드

  @@default_bold = false

  

  # 디폴트 이탤릭

  @@default_italic = false

  

  # 디폴트 색깔

  @@default_color = Color.new(255, 255, 255)

  

  # 목록

  LIST = {

  

  "맑은 고딕" => "Fonts/malgun", 

  

  "나눔명조" => "Fonts/NanumMyeongjo", 

  

  }

  

  # Win32API

  ShellExecute = Win32API.new("shell32", "ShellExecute", "lppppl", "l")

  

  # 셋업

  def self.setup

    # 네코

    neko

    # 윈도우

    window

  end

  

  # 네코

  def self.neko

    if ENV['OS'] == "Android"

      route = sprintf("%s/KernysRGSS/", 

      ENV['EXTERNAL_STORAGE'])

      i = @@default_name.is_a?(Array) ? 

      @@default_name[0] : @@default_name

      data = Encryption.load_file(LIST[i], ".ttf")

      if File.exist?(route + "font.ttf")

        if File.size(route + "font.ttf") == data[0].size

          return

        end

      end

      Encryption.write_file(route + "font.ttf", data)

    end

  end

  

  # 윈도우

  def self.window

    @@default_name.each do |i|

      unless Font.exist?(i)

        msgbox(i + " 폰트가 없습니다. 폰트를 설치해주시기 바랍니다.")

        exit if LIST[i].nil?

        Encryption.save_file(LIST[i], ".ttf")

        ShellExecute.call(0, "open", Dir.pwd + "/Fonts", 0, 0, 1)

        exit

      end

    end

  end

end

 

 

#==============================================================================

# ** Encryption

#==============================================================================

 

module Encryption

  

  # 파일 저장

  def self.save_file(filename, extend)

    return if exist?(filename, extend)

    data = load_file(filename, extend)

    return if data.nil?

    filename << data[1]

    create_dir(filename)

    write_file(filename, data[0])

    filename

  end

  

  # 파일 존재

  def self.exist?(filename, extend)

    data = nil

    extend.each do |i|

      data = File.exist?(filename + i)

      if data.is_a?(TrueClass)

        break 

      end

    end

    data

  end

  

  # 파일 로드

  def self.load_file(filename, extend)

    data = nil

    extend.each do |i|

      if data != nil

        break

      end

      begin

        data = [load_data("Data/" + filename + i), i]

      rescue

        nil

      end

    end

    data

  end

  

  # 파일 쓰기

  def self.write_file(filename, data)

    File.open(filename, "wb") do |f| 

      f.write(data)

    end

  end

  

  # 폴더 생성

  def self.create_dir(path)

    path = path.split("/")

    path.each do |i|

      if i.include?(".")

        path.pop

      end

    end

    subpath = ""

    path.each do |i|

      subpath << i << "/"

      unless File.exist?(subpath)

        Dir.mkdir(subpath)

      end

    end

    subpath

  end

end

 

#==============================================================================

# ** Marshal

#==============================================================================

 

module Marshal

  

  # 셀프 클래스

  class << self

    

    # 메소드 별명

    alias_method(:mar_load, :load) unless method_defined?(:mar_load)

    

    # 로드

    def load(port)

      mar_load(port)

    rescue TypeError

      if port.is_a?(File)

        port.rewind

        port.read

      else

        port

      end

    end

  end

end

 

#==============================================================================

# ** msgbox

#==============================================================================

 

def msgbox(*args)

  print(args.collect { |arg| arg.to_s }.join("\n"))

end unless defined?(msgbox)

 

#==============================================================================

# ** msgbox_p

#==============================================================================

 

def msgbox_p(*args)

  print(args.collect { |obj| obj.inspect }.join("\n"))

end unless defined?(msgbox_p)

 

Colored by Color Scripter

cs

 

 

 

 

?

  1. Mog_Battle_hud(MZ버전도 있습니다)

    Date2021.03.05 CategoryRPGMV 플러그인 By스트레이보우 Views1847 Votes0
    Read More
  2. 컷신 플러그인

    Date2020.10.30 CategoryRPGMV 플러그인 By스트레이보우 Views2453 Votes0
    Read More
  3. 업적플러그인

    Date2020.09.02 CategoryRPGMV 플러그인 By스트레이보우 Views2090 Votes0
    Read More
  4. 한글조합입력기(영어가능)

    Date2019.11.10 CategoryRPGXP 스크립트 By조규진1 Views946 Votes0
    Read More
  5. 게임에서 제공해주는 노래가 아닌 외부에서 다운받고 안에 넣어쓰려면 어떻게 해야하나요?

    Date2019.07.26 CategoryRPGMV 플러그인 ByBigOrca Views1463 Votes0
    Read More
  6. Ghost Effect

    Date2019.01.20 CategoryRPGMV 플러그인 By러닝은빛 Views1156 Votes0
    Read More
  7. RPG XP Xas액알

    Date2018.10.30 CategoryRPGXP 스크립트 By심심치 Views1161 Votes0
    Read More
  8. 커스텀 숫자 입력 패드

    Date2018.10.19 CategoryRPGMV 플러그인 By러닝은빛 Views1222 Votes0
    Read More
  9. 9마리 이상의 몬스터 설정 | More Enemies

    Date2018.08.31 CategoryRPGMV 플러그인 By러닝은빛 Views974 Votes0
    Read More
  10. 동적 맵 타일 수정 플러그인

    Date2018.07.17 CategoryRPGMV 플러그인 By베지테리안카카오 Views1035 Votes0
    Read More
  11. VXA에서 XBOX360 컨트롤러 사용 여부 체크

    Date2018.07.15 CategoryRPGVX Ace 스크립트 By러닝은빛 Views891 Votes0
    Read More
  12. RMMV 옵션 창에 메시지 속도 및 글자 크기 변경 기능 추가

    Date2018.07.15 CategoryRPGMV 플러그인 By러닝은빛 Views1636 Votes0
    Read More
  13. 한글 데미지 표시

    Date2018.07.09 CategoryRPGMV 플러그인 By러닝은빛 Views1420 Votes0
    Read More
  14. [ MV ] 심장[체력표시 하트] 플러그인

    Date2018.07.01 CategoryRPGMV 플러그인 By수성의물 Views2257 Votes0
    Read More
  15. [鳥小屋] 실적 플러그인(인게임 트로피 시스템)

    Date2017.10.31 CategoryRPGMV 플러그인 By이니군 Views1747 Votes0
    Read More
  16. LuD Script Package

    Date2017.08.16 CategoryRPGVX Ace 스크립트 ByLuD Views1674 Votes0
    Read More
  17. [VXAce] 레이어 맵 <layer> 시스템

    Date2017.08.07 CategoryRPGVX Ace 스크립트 ByLuD Views1272 Votes0
    Read More
  18. [RPG MV] 퀘스트 마커 지속 표시 플러그인

    Date2017.04.09 CategoryRPGMV 플러그인 Bylklslel Views1697 Votes0
    Read More
  19. Mirror Area - RPG Maker MV

    Date2017.01.03 CategoryRPGMV 플러그인 By러닝은빛 Views5033 Votes0
    Read More
  20. Keyboard Event - RPG Maker MV

    Date2017.01.03 CategoryRPGMV 플러그인 By러닝은빛 Views2311 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15


[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)