Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: adobe font #32

Merged
merged 2 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added AdobeFangsongStd-Regular.otf
Binary file not shown.
Binary file added AdobeHeitiStd-Regular.otf
Binary file not shown.
Binary file added AdobeKaitiStd-Regular.otf
Binary file not shown.
Binary file added AdobeSongStd-Light.otf
Binary file not shown.
36 changes: 36 additions & 0 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,42 @@ The project has been configured with GitHub Actions in `.github/workflows/*.yaml

See [tongji-undergrad-thesis-env](https://github.com/TJ-CSCCG/tongji-undergrad-thesis-env) for detailed instructions.

## Use more complete Adobe fonts (optional)

### Style modification

In order to use the more complete Adobe fonts from the font library, you need to make the following modifications:

Find the following code snippet on line 10 of `style/tongjithesis.cls`:

```latex
\LoadClass[UTF8,a4paper,fontset=fandol]{ctexart}
```

and modify it to:

```latex
\LoadClass[UTF8,a4paper,fontset=adobe]{ctexart}
```

With this modification, LaTeX will use the Adobe font set to render the document.

### Font installation

The steps to install fonts are as follows:

1. In our repository root directory, we have attached four font files from Adobe (`AdobeFangsongStd-Regular.otf`, `AdobeKaitiStd-Regular.otf`, `AdobeHeitiStd-Regular.otf`, `AdobeSongStd-Light.otf`). If you use our template directly on Overleaf, you don't need to install it, but it should be noted that the compilation speed may be slightly slower. Therefore, we recommend that you compile locally.
2. If you use LaTeX on Windows, macOS or Linux, you need to install these four font files manually. Once installed, you are ready to compile.

Note the support for the following compilation methods:

* If you are using Overleaf, only compiling with LuaLaTeX is supported.
* If you compile locally on Windows, macOS or Linux, you can choose to use XeLaTeX or LuaLaTeX.

You can see the specific effect in Section 1.2.1 "Testing Rare Words" of the template document.

With the steps above, you will be able to use Adobe font sets and render documents correctly.

## How to contribute to this project?

Please refer to [How to pull request](CONTRIBUTING.md/#how-to-pull-request).
Expand Down
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,43 @@ pip install Pygments

详细使用方法见 [tongji-undergrad-thesis-env](https://github.com/TJ-CSCCG/tongji-undergrad-thesis-env)。

## 使用字库更完整的 Adobe 字体(可选)

### 样式修改

为了使用字库更完全的 Adobe 字体,您需要进行以下修改:

在 `style/tongjithesis.cls` 的第 10 行找到如下代码段:

```latex
\LoadClass[UTF8,a4paper,fontset=fandol]{ctexart}
```

并将其修改为:

```latex
\LoadClass[UTF8,a4paper,fontset=adobe]{ctexart}
```

这样修改后,LaTeX 将使用 Adobe 字体集来渲染文档。

### 字体安装

字体安装的步骤如下:

1. 在我们的仓库根目录中,我们已经附上了 Adobe 的四个字体文件。如果您在 Overleaf 上直接使用我们的模板,您无需进行安装,但需要注意的是编译速度可能会稍慢。因此,我们建议您在本地进行编译。
2. 如果您在 Windows、macOS 或 Linux 上使用 LaTeX,您需要手动安装这四个字体文件。安装完成后,您就可以进行编译了。

请注意以下编译方式的支持情况:

* 如果您在 Overleaf 上使用,只支持使用 LuaLaTeX 进行编译。
* 如果您在 Windows、macOS 或 Linux 上进行本地编译,您可以选择使用 XeLaTeX 或 LuaLaTeX。

您可以在模板文档的 1.2.1 小节 “测试生僻字” 中查看具体效果。

通过以上步骤,您将能够使用 Adobe 字体集并正确渲染文档。


## 如何为该项目贡献代码?

还请查看 [How to pull request](CONTRIBUTING.md/#how-to-pull-request)。
Expand Down
Binary file removed figures/TUlogo.jpg
Binary file not shown.
Binary file removed figures/det.png
Binary file not shown.
Binary file removed figures/pose.png
Binary file not shown.
Binary file removed figures/seg.png
Binary file not shown.
4 changes: 4 additions & 0 deletions sections/01_intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ \subsection{字体}
{\ifcsname kaishu\endcsname\kaishu\else[无 \cs{kaishu} 字体。]\fi
抗日战争胜利后,1946年,国立同济大学分批迁回上海。由于缺少校舍,学校分散教学,成为斜跨上海市区、分散十多处的“大学校”。其中学校办公室和医学院位于善钟路100弄10号(今常熟路),附属医院分别为白克路上的中美医院(原宝隆医院,今凤阳路)和同孚路82号(今石门一路)的原德国医院,理学院在平昌街日本第七国民学校内(今国顺路上海电视大学),文法学院在四川北路(今复兴初级中学),新生院位于江湾新市区的市图书馆(今黑山路),高级工业职业学校则在江湾魏德迈路(今邯郸路),附属中学位于市博物馆(今长海医院飞机楼)。工学院位于其美路的原日本中学(今杨浦区四平路1239号),1949年后逐步发展成同济大学的主校区。}

\subsubsection{测试生僻字}\label{sec:uncommon}

本小节对生僻字\footnote{此处的生僻字指:GBK编码中有,但GB2312编码中没有的字。}的显示进行测试。

丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪乫乬乭乮乯乲乴乵乶乷乸乹乺乻乼乽乿亀亁亃亄亅亇亊亐亖亗亙亜亝亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂伃伄伅伆伇伈伋伌伒伓伔伕伖伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾伿佀佁佂佄佅佇佈佉佊佋佌佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅侇侊侌侎侐侒侓侕侘侙侚侜侞侟価侢侤侫侭侰侱侲侳侴侶侷侸侹侺侻侼侽侾俀俁係俆俇俈俉俋俌俍俒俓俔俕俖俙俛俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿倀倁倂倃倄倅倇倈倊倎倐倓倕倖倗倛倝倞倠倢倣値倧倯倰倱倲倳倴倵倶倷倸倹倻倽倿偀偁偂偄偅偆偊偋偍偐偑偒偓偔偖偗偘偙偛偝偞偟偠偡偢偣偤偦偧偨偩偪偫偭偮偯偰偱偲偳偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎傏傐傑傒傓傔傕傖傗傚傛傜傝傞傟傠傡傢傤傦傪傫傮傯傰傱傴傶傸傹傼傽傿僀僁僂僃僄僆僇僈僉僊僋僌働僎僐僒僓僔僗僘僙僛僜僝僟僠僡僢僣僤僨僩僪僫僯僰僱僲僴僶僷僸僺僼僽僾僿儁儂儃儅儊儌儍儎儏儐儑儓儔儕儖儗儘儙儚儛儜儝儞儠儢儣儤儥儦儧儨儩儫儬儭儮儯儰儱儳儴儵儶儷儸儹儺儻儼儽。
7 changes: 7 additions & 0 deletions style/tongjithesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
% 该类提供包括但不限于 \heiti \zihao 等指令
\LoadClass[UTF8,a4paper,fontset=fandol]{ctexart}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \LoadClass[UTF8,a4paper,fontset=adobe]{ctexart}
% 若需要使用包含所有 GBK 字符的 Adobe 字体,可使用如上命令
% 需要完成 README.md 中提到的字体安装步骤
% Overleaf 上使用该命令时编译速度会变慢很多,建议本地编译
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% 设置页边距
\setlength{\headheight}{43pt}
Expand Down
Loading