mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
fix: remove emojis from display overlay and increase font size to 65
This commit is contained in:
1 parent
5c33d7fac0
commit
838d168239
2 files changed
+8
-4
No files matched your search
@@ -162,12 +162,14 @@ class ReelRequest(BaseModel):
|
||||
|
||||
|
||||
def clean_text_for_display(text: str) -> str:
|
||||
"""Removes hashtags but keeps emojis and punctuation for display."""
|
||||
"""Removes emojis and hashtags for display (text only)."""
|
||||
if not text:
|
||||
return ""
|
||||
# Remove hashtags (e.g. #viral #fyp)
|
||||
# 1. Remove emojis
|
||||
text = emoji.replace_emoji(text, replace="")
|
||||
# 2. Remove hashtags (e.g. #viral #fyp)
|
||||
text = re.sub(r"#\w+", "", text)
|
||||
# Collapse multiple spaces
|
||||
# 3. Collapse multiple spaces
|
||||
text = re.sub(r"\s+", " ", text).strip()
|
||||
return text
|
||||
|
||||
@@ -272,7 +274,7 @@ async def generate_tts_with_subs(
|
||||
|
||||
|
||||
def generate_simple_ass(
|
||||
text: str, ass_path: Path, font_size: int = 50, total_duration: float = None
|
||||
text: str, ass_path: Path, font_size: int = 65, total_duration: float = None
|
||||
):
|
||||
"""Generate a high-quality ASS subtitle file with embedded styling."""
|
||||
# Split text into chunks
|
||||
|
||||
@@ -132,6 +132,8 @@ Ajout d'une fonctionnalité complète de création de Reels Facebook permettant
|
||||
- [x] Filtrer les hashtags de l'affichage vidéo (clean_text_for_display)
|
||||
- [x] Revenir à `DejaVu Sans` pour garantir l'affichage -> **Solution Finale**: Auto-download `Noto Color Emoji` + Config `Sans` generic.
|
||||
- [x] Vérifier la logique de stabilisation (Toggle fonctionnel)
|
||||
- [x] **Update**: Suppression totale des emojis de l'affichage (demande utilisateur)
|
||||
- [x] **Update**: Augmentation de la taille de police (50 -> 65)
|
||||
- [x] **Fix F-String Syntax** : Correction de l'erreur `f-string expression part cannot include a backslash`.
|
||||
- [x] **Final Robust Fix** : Switch complet vers le filtre `subtitles` et format `.srt` pour contourner l'absence de `drawtext` dans l'environnement.
|
||||
- [x] **Style Adjustment** : Réduction de la taille du texte à 30 pour un rendu plus élégant.
|
||||
|
||||
Reference in new issue
Block a user