므하하 ESD와 한참 고민하다
어짜피 클립아트, 템플렛, 폰트 차이가 있을 가능성이 있다고 해도 안쓰잖아?
그래서 그냥 6930원에 질러버렸다!


근데.. "조이 매체로 된" 어쩔? ㅠ.ㅠ
종이 매체도 아니고 ㅠ.ㅠ




다운로드는 비교적 양호한편
그런데.. 1.33GB라.. 내가 오판을 한걸까?
home ESD나 이거나 내용상 차이가 없을것 같은 스멜이 -ㅁ-!
Posted by 구차니
어제 퇴근길에 끄적대면서 힘들게 컴파일을 했는데.. 정말 힘들다 ㄱ-

example2.cpp의 경우 gcc 대신 g++ -lm -lfreetype 만 해주면 되는데
example3.cpp는 에러가 난다. -ㅁ-!
그래서 부랴부랴 다시 소스를 열어보니

# vi example3.cpp
  1 // example3.cpp
  2
  3 // This file demonstrates how to use FreeType's stand-alone renderer,
  4 // both in B/W and 5-levels gray mode.
  5 //
  6 // Copy the files ftraster.c, ftimage.h, and ftmisc.h into the same
  7 // directory as this file, then say
  8 //
  9 //   g++ -D_STANDALONE_ \
 10 //       -DFT_RASTER_OPTION_ANTI_ALIASING \
 11 //       -o example3 example3.cpp
위와 같이 소스를 보면 소스안에 저렇게 컴파일 해라~ 라고 친절이 나와있다.

아무튼 저 녀석들을 동일한 디렉토리에 복사해주면 일단 해결~
freetype-2.3.12/src/raster/ftraster.c
freetype-2.3.12/src/raster/ftmisc.h
freetype-2.3.12/include/freetype/ftimage.h

example2.cpp 결과
$ ./example2.o /usr/share/fonts/truetype/ttf-japanese-gothic.ttf test.tga


리눅스에서 열어본 파일.


Windows용 GIMP에서 열어본 파일


GIMP에서 PNG로 변환한 파일.


example3.cpp 결과
 $ ./example3.o


linux에서 열어본 화면
$ file *.pgm
out-gray.pgm: Netpbm PGM "rawbits" image data
$ file *.pbm
out-mono.pbm: Netpbm PBM "rawbits" image data

2010/05/30 - [프로그램 사용/libfreetype] - libfreetype tutorial 따라하기

'프로그램 사용 > libfreetype' 카테고리의 다른 글

libfreetype tutorial 따라하기  (2) 2010.05.30
libfreetype, FreeType project  (4) 2010.05.26
Posted by 구차니
아버지께서 이번에 네비 업글을 하시고는
경위도(경도/위도)가 출력되지 않는다고 항의를 하셔서 검색을 해보니

경도·위도 바뀐다'…내년부터 동경기준 버리고 세계기준으로 변경'
라는 기사가 있었다. 그당시에는 일본기준 좌표계에서 세계 좌표계로 간다고 해서 환영을 했는데
생각을 해보니, 굳이 이것을 버리고 세계표준으로 간다고 해서 제외될 항목은 아닌데
왜 굳이 팅크웨어측에서 뺐는지 모르겠다.

아무튼, 아이나비 홈페이지에서도 항의글이 팍팍 올라오고 있으니 기다려 볼수밖에..

[링크 : http://withwani.springnote.com/pages/888312]
[링크 : http://www.inavi.com/_Menu/iNaviTalk/Know/ask_view.asp?KT_Question_Key=28004]


공지사항을 보니 2009년 11월 18일 패치부터 경위도 서비스가 막혔다.

11월 정기 지도 업그레이드 및 패치 시행 안내
2009-11-18

[내비게이션SW(어플리케이션) 패치 내역]

아이나 비SE
(UZ PNS포함)/
3D/ On 서비스
공 통
 
  경위도 검색 및 표시 서비스 중단

 ※ 대한측량협회로부터 전자지도(인터넷, 내비게이션 등) 상에 좌표(경·위도등)가
     서비스 되는 것과 관련하여 측량법 제25조(측량성과의 간행등) 1항 및
     국가공간정보보안관리규정 별표1(등급별 공간정보의 분류 기준) 등에서 표시 제한을
     규정하는 권고(시정조치) 사항에 따라 본 기능을 제한하게 되었습니다.

     측량법은 측량수로조사 및 지적에 관한 법률로 통합될 예정으로
     측 량법 제23조는 측량 수로조사 및 지적에 관한 법률 제15조로 통합되는 조항입니다.

[링크 : http://www.inavi.com/_Menu/Customer/notice_view.asp]


Posted by 구차니
/usr/lib/gconv 에는 iconv 에서 사용하는 변환에 대한 테이블(?) 파일들이 존재한다.
예를 들어 ISO8859-1는 ISO8859-1.so 이런식으로 존재하는데
이것을 찾기 위한 alias 파일이 존재한다.

-rw-r--r-- 1 root root  54K Oct  8  2006 gconv-modules

바로 요녀석인데, 이녀석이 존재하지 않으면
so 파일들이 존재해도 파일을 찾지못해 변환을 하지 못한다.

2010/06/01 - [프로그램 사용/iconv() / glibc] - iconv 라이브러리 위치




2010.06.03 추가

임베디드에서 특정 디렉토리에 넣어야 할 경우에는
gconv 디렉토리를 다른곳으로 넣고
export GCONV_PATH=/[new path] 씩으로 .bashrc나 .bash_profile 등에 넣어주면 된다.

GCONV_PATH Directories in which iconv() looks for character encoding libraries
[링크 : http://www.scratchbox.org/documentation/general/tutorials/glibcenv.html]

'프로그램 사용 > iconv() & glibc' 카테고리의 다른 글

iconv 라이브러리 위치  (0) 2010.06.01
iconv() 함수 완전정복(?)  (0) 2010.04.23
iconv() 함수 사용하기  (6) 2010.04.20
linux iconv 테스트  (0) 2010.04.20
iconv 유틸리티/프로그램 사용하기  (2) 2010.04.19
Posted by 구차니
프로그램 사용2010. 6. 1. 14:08
난 한RSS리더를 사용한다.
다르게 말하자면 항상 파이어폭스를 켜놓고 산다.
그러다 보면 이넘의 불여우가 간을 빼먹는게 아니라 메모리를 빼먹는다 ㄱ-

매너없는 메모리. 최고 350MB 까지 가봤음

그래서 부랴부랴 검색을 해서 부가기능에서 memory 키워드로 검색해서 별이 가장 많은 AFOM을 설치했다.
머.. 벤치마킹 이런건 모르겠지만, 체감적으로 상당히 부드러워졌고
메모리가 120MB를 넘어서면 정리를 해서 8MB 까지 떨어지고 다시 또 차오르고를 반복한다.
조금은 더 오래 써봐야 알겠지만, 생각보다 쓸만해 보인다.




2010.06.03 추가
주말에 집에서 사용해보니, 노트북에서는 조금 버벅대는 감이있다.
꾸준히 약간 버벅대냐, 한번 대박으로 버벅대냐의 차이일려나? ^^;
노트북은 센트리노 1.2Ghz / 1GB 이다.

Posted by 구차니
뜬금없는 이야기지만, 일단 iconv는 libc 를 이용한다.
그런데 이 넘은 실제로 /usr/lib/gconv/*.so 파일들을 사용한다.

아무튼, 이 넘들이 없으면 에러는 안나지만 변환이 안된다.
(임베디드에서 iconv 쓰는데 변환이 안되서 찾은 문제)


strace를 해보니
gconv-module은 /usr/lib/gconv-modules에서 잘 open 했는데 EUC-KR.so 를 open 한 후 libc.so.6ld-linux.so.2를 찾네요, 저는 shared library를 안쓰고 있는데 ㅠㅠ 그래서 위 두 파일을 ramdisk/usr/lib 에 복사해 넣은 후 TARGET에서 다시 iconv sample 프로그램을 돌려보니 이제는 정상 동작 합니다.

[링크 : http://kldp.org/node/76270]



음.. 그래서 일단은 libc*로 파일들을 검색해보니 "libc.so" 가 없다.
so 라길레 파일 용량을 보니 저렴한 238Byte. 그래서 cat으로 해보니 텍스트 파일이다.

>>> x86 리눅스의 libc.so 내용
# cat /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )

>>> sh4 리눅스의 libc.so 내용
]# cat usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-sh-linux)
GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )



수동으로 crt 코드와 libc를 링크시켜 줍니다. 여기까지 해서 동작을 잘 해야 하는데, 컴파일/링킹 워닝이나 에러가 안나지만 프로그램이 동작하지 않습니다.

$ readelf -l test
...
INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1
[Requesting program interpreter: /usr/lib/libc.so.1]
...

dynamic linker를 시스템 기본값인 /usr/lib/libc.so.1로 지정하는데, 문제는 시스템에는 해당 파일이 없습니다--; 마찬가지 방법으로 /bin/ls의 INTERP 섹션을 읽어보니까 INTERP는 /lib/ld-linux.so.2로 되어 있네요. 위에서 /usr/lib/libc.so.1 은 없고 /usr/lib/libc.so는 있는데, 이 파일의 내용은 다음과 같습니다.

$ cat /usr/lib/libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) )
출처:ld의 동작


[링크 : http://earthfall.egloos.com/1794074]

Posted by 구차니
libfreetype의 example1.c 컴파일 하려면 보기보다 빡시다
버그인지는 모르겠지만 /usr/include/ft2build.h 파일에 include 경로가
 #include <freetype/config/ftheader.h>
로 되어있지만 실제로 이 경로는 존재하지 않는다.

/usr/include/freetype2/freetype 에 각종 헤더들이 존재하는데, 이를 해결하기 위해서는
 ln -s /usr/include/freetype2/freetype /usr/include/freetype
이런식으로 심볼릭 링크를 생성해주어야 한다.

아무튼 이러한 헤더경로를 수정해주고 나면 모르면 어려운 에러가 발생한다.
freetype 을 사용하는 녀석들은 수학 라이브러리와 freetype 라이브러리를 사용하므로
 $ gcc -lm -lfreetype
을 넣고 컴파일을 돌려야 한다.
2010/05/30 - [Linux] - libm (math library)

그리고 example1.c 의 경우 폰트의 경로를 직접넣어 주어야 한다.
우분투에서 폰트의 기본 경로는 /usr/share/fonts 이므로 그 안에서 직접 폰트의 전체경로를 넣어주어야 한다.
2010/05/30 - [Linux/Ubuntu] - 우분투 기본 폰트 경로 - Default path of Ubuntu fonts

freetype-doc-2.3.12.tar.bz2 << 이녀석을 압축해제하면 docs/tutorial 에 example?.c 파일'들'이 있다.
그중에 example1.c 를 컴파일 하였으며
 $ gcc -lm -lfreetype example1.c
 $ ./a.out /usr/share/fonts/truetype/ttf-japanese-gothic.ttf test > tt.txt
위와 같은 명령줄로 실행하여 나온 결과는 아래와 같다.
이미지 처럼 나온 것은 메모장을 축소하여 일부분만 잘라낸 것이다.



Posted by 구차니
프로그램 사용/GIMP2010. 5. 27. 11:17
다음 뷰에서 HDR로 합성하는 내용이 있어서 봤더니
포토매틱스(photomatix) 라는 프로그램을 쓴다고 한다.
혹시나 해서 GIMP에서도 가능하지 않을까 해서 검색을 해봤는데 현재로서는.. 이미지도 없고 -ㅁ-
집에가서 확인해봐야겠다.

[링크 : http://www.instructables.com/id/HDR-photos-with-the-GIMP/]

[링크 : http://www.hdrsoft.com/] photomatix
    [링크 : http://toycamera.tistory.com/1174]
    [링크 : http://mindman.tistory.com/385]


Posted by 구차니
프로그램 사용2010. 5. 26. 21:57
웹초보님의 구글 크롬 5.0 공식 릴리즈 (맥 & 리눅스 정식 버전 포함) 글을 보고
집에와서 우분투 10.04에서 설치를 하려니...



일단 코리아 우분투 아카이브 폭발(?)로 인해 업데이트 불가.
그래서, 구글 홈페이지에서 deb로 받으니 설치완료


하.지.만
파이어폭스에서도 여전했던, 티스토리 이미지 업로드 시 '사진추가' '확인' 등의 버튼이 가출하는 문제가
크롬에서도 여전히 발생했다.


Posted by 구차니

[공식 : http://www.freetype.org/]
    [freetype 1 : http://freetype.sourceforge.net/freetype1/index.html] << freetype 2로 프로젝트 넘어감
    [freetype 2 : http://freetype.sourceforge.net/freetype2/index.html]


libfreetype은 freetype 프로젝트의 부산물(?)이며, 이녀석은 글꼴을 그려주는 라이브러리이다.
  • By default, FreeType 2 supports the following font formats.

    • TrueType fonts (and collections)
    • Type 1 fonts
    • CID-keyed Type 1 fonts
    • CFF fonts
    • OpenType fonts (both TrueType and CFF variants)
    • SFNT-based bitmap fonts
    • X11 PCF fonts
    • Windows FNT fonts
    • BDF fonts (including anti-aliased ones)
    • PFR fonts
    • Type 42 fonts (limited support)
보다시피 거의 모든 폰트를 지원하며, 벡터/TrueType 폰트/외곽선 폰트 및 비트맵 폰트를 지원한다.
말이 복잡하지만, 간단하게 말해서 확대해도 안깨지는 글꼴과 확대하면 깨지는 글꼴을 지원한다.

그리고 두가지 라이센스를 제공한다. 머 BSD-like 가 GPL보다는 숨통이 트이니 사용자 입장에서는 좋긴하다.
FreeType 2 is released under two open-source licenses: our own BSD-like FreeType License and the GPL.


아무튼, 애플에서 이러한 힌팅기술에 대한 특허를 가지고 있으므로
특허권에 의해서 patented bytecode를 무시하여 약간은 부드럽지 못하게 나온다고 한다.
(아래의 사진을 보면 K R W Z 가 약간 깨어져 보인다.)
What Is Patented

It is important to clarify that the patents only cover a small subset of the TrueType instructions (not the whole process of hinting glyphs with specific bytecode programs). Unfortunately, the patented bytecodes are relatively often used in high-quality glyph programs.

For example, here is a picture showing the ‘Arial’ font with a specific version of the FreeType bytecode interpreter that simply ignores the patented bytecodes.

As you can see, some rather unpleasant artifacts make the font unacceptable for normal reading use.

Is FreeType 2 Affected by the Patents?

The answer is no for any recent build of FreeType 2, since it comes with an ‘auto-hinting’ module that was specifically designed to completely ignore the TrueType bytecode instructions.

However, the source code for the bytecode interpreter is still available and can be toggled on at compile time, for those that want to use it anyway (because they purchased a license from Apple, or because they are in a country where the patents do not apply, etc.). For details please check the documentation that comes with your FreeType source package (it normally involves changing one configuration macro).

Note that some beta versions of FreeType 2 did use the bytecode interpreter (since the auto-hinter wasn't available yet).

Finally, many Linux distributions seem to distribute a patched version of FreeType 2 with the bytecode interpreter activated, unlike the sources we distribute. Of course, we can only deny any kind of responsibility in this case. It further means that in the event where you need to update the version of FreeType installed on your system from our sources, you should better manually activate the bytecode interpreter at compile time in order to prevent any loss of quality.

[링크 : http://freetype.sourceforge.net/patents.html]


트루타입(TrueType)은 외곽선 글꼴 표준으로, 1980년대 말에 애플 컴퓨터어도비포스트스크립트에 쓰이는 타입 1 글꼴에 대항하기 위해 개발하였다. 트루타입의 주된 이점은 글꼴 개발자들에게 글꼴이 다양한 글꼴 크기에서 어떻게 표시될 것인지에 대한 높은 수준의 제어를 할 수 있다는 것이며 이를 힌팅기술 혹은 힌팅 인스트럭션이라고 한다.

[링크 : http://ko.wikipedia.org /wiki/트루타입]
[링크 : http://en.wikipedia.org/wiki/TrueType]

Posted by 구차니