feat: add Thai language option for stamp feature (#3825)

# Description of Changes


This pull request adds support for Thai language text stamps in the
`StampController` and updates the corresponding HTML template to include
Thai as an option in the language selection dropdown.

### Thai language support:

*
[`stirling-pdf/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java`](diffhunk://#diff-1fc63d07188744082edc3780d43868119bf9876868c8c8db6ce324b57c60284eR184-R186):
Added a case for "thai" in the `addTextStamp` method, specifying the
font file `NotoSansThai-Regular.ttf` for Thai language support.
*
[`stirling-pdf/src/main/resources/templates/misc/stamp.html`](diffhunk://#diff-29cf511e86ebd2b1d4f378e4f0bd301aa5e024e6dc66f93672206c2b1ffa526cR91):
Added a new `<option>` for Thai language ("ไทย") in the dropdown menu
for language selection.


### Preview:


![image](https://github.com/user-attachments/assets/ef6d20e9-2df8-4970-bd4e-d4ee0780e8d1)



[dummy_stamped.pdf](https://github.com/user-attachments/files/20910418/dummy_stamped.pdf)


---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [x] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [x] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
This commit is contained in:
Balázs Szücs 2025-06-26 00:24:26 +02:00 committed by GitHub
parent 2177eff6c4
commit 11e3ccd19f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,9 @@ public class StampController {
case "chinese":
resourceDir = "static/fonts/SimSun.ttf";
break;
case "thai":
resourceDir = "static/fonts/NotoSansThai-Regular.ttf";
break;
case "roman":
default:
resourceDir = "static/fonts/NotoSans-Regular.ttf";

View File

@ -88,6 +88,7 @@
<option value="japanese">日本語</option>
<option value="korean">한국어</option>
<option value="chinese">简体中文</option>
<option value="thai">ไทย</option>
</select>
</div>